From a33ec3708c303380ea45426cefe6e21f77c7d675 Mon Sep 17 00:00:00 2001 From: Borber Date: Sun, 8 Jan 2023 17:24:15 +0800 Subject: [PATCH] =?UTF-8?q?[mod]=20v0.1.3=20=E8=8E=B7=E5=8F=96=E8=99=8E?= =?UTF-8?q?=E7=89=99=E7=9B=B4=E6=92=AD=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 2 ++ src/main.rs | 8 +++++++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d06e0d2..1c8d5d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -938,7 +938,7 @@ checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" [[package]] name = "seam" -version = "0.1.2" +version = "0.1.3" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 4b4403b..63a8f83 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 diff --git a/README.md b/README.md index 1426c99..98a258c 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ |[B站](https://live.bilibili.com/)|`https://live.bilibili.com/`| |[斗鱼](https://www.douyu.com/)|`https://www.douyu.com/` 或 `https://www.douyu.com/xx/xx?rid=`| |[抖音](https://live.douyin.com/)|`https://live.douyin.com/`| +|[虎牙](https://huya.com/)|`https://huya.com/`| |[艺气山](https://www.173.com/)|`https://www.173.com/`| |[棉花糖](https://www.2cq.com/)|`https://www.2cq.com/`| @@ -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 diff --git a/src/main.rs b/src/main.rs index 21dd9ac..e8893f4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,7 +15,7 @@ ________ _______ _______ _______ |__ | ___| | | |_______|_______|___|___|__|_|__| -获取直播源地址, 目前支持 bilibili, 抖音, 艺气山, 棉花糖", long_about = None)] +获取直播源地址, 目前支持 B站, 斗鱼, 抖音, 虎牙, 艺气山, 棉花糖", long_about = None)] struct Cli { #[command(subcommand)] command: Commands, @@ -38,6 +38,11 @@ enum Commands { /// 房间号 rid: String, }, + /// 虎牙 + Huya { + /// 房间号 + rid: String, + }, /// 艺气山 Yqs { /// 房间号 @@ -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?), }