Skip to content

Commit

Permalink
[mod] v0.1.3 获取虎牙直播源
Browse files Browse the repository at this point in the history
  • Loading branch information
Borber committed Jan 8, 2023
1 parent 365d588 commit a33ec37
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "seam"
version = "0.1.2"
version = "0.1.3"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
|[B站](https://live.bilibili.com/)|`https://live.bilibili.com/<RID>`|
|[斗鱼](https://www.douyu.com/)|`https://www.douyu.com/<RID>``https://www.douyu.com/xx/xx?rid=<RID>`|
|[抖音](https://live.douyin.com/)|`https://live.douyin.com/<RID>`|
|[虎牙](https://huya.com/)|`https://huya.com/<RID>`|
|[艺气山](https://www.173.com/)|`https://www.173.com/<RID>`|
|[棉花糖](https://www.2cq.com/)|`https://www.2cq.com/<RID>`|

Expand All @@ -39,6 +40,7 @@
- [x] [B站](https://live.bilibili.com/)
- [x] [斗鱼](https://www.douyu.com/)
- [x] [抖音](https://live.douyin.com/)
- [x] [虎牙](https://huya.com/)
- [x] [艺气山](https://www.173.com/)
- [x] [棉花糖](https://www.2cq.com/)
- [x] cli
Expand Down
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ________ _______ _______ _______
|__ | ___| | |
|_______|_______|___|___|__|_|__|
获取直播源地址, 目前支持 bilibili, 抖音, 艺气山, 棉花糖", long_about = None)]
获取直播源地址, 目前支持 B站, 斗鱼, 抖音, 虎牙, 艺气山, 棉花糖", long_about = None)]
struct Cli {
#[command(subcommand)]
command: Commands,
Expand All @@ -38,6 +38,11 @@ enum Commands {
/// 房间号
rid: String,
},
/// 虎牙
Huya {
/// 房间号
rid: String,
},
/// 艺气山
Yqs {
/// 房间号
Expand All @@ -57,6 +62,7 @@ async fn main() -> Result<()> {
Commands::Bili { rid } => util::match_show_type(live::bilibili::get(&rid).await?),
Commands::Douyu { rid } => util::match_show_type(live::douyu::get(&rid).await?),
Commands::Douyin { rid } => util::match_show_type(live::douyin::get(&rid).await?),
Commands::Huya { rid } => util::match_show_type(live::huya::get(&rid).await?),
Commands::Yqs { rid } => util::match_show_type(live::yqs::get(&rid).await?),
Commands::Mht { rid } => util::match_show_type(live::mht::get(&rid).await?),
}
Expand Down

0 comments on commit a33ec37

Please sign in to comment.