feat: add potoken option to downloader

This commit is contained in:
ThetaDev 2024-08-09 21:41:47 +02:00
parent d36ba595da
commit 904f8215d8
No known key found for this signature in database
GPG key ID: E319D3C5148D65B6
3 changed files with 99 additions and 2 deletions

View file

@ -103,6 +103,9 @@ enum Commands {
/// YT Client used to fetch player data
#[clap(long)]
client_type: Option<PlayerType>,
/// Pot token to circumvent bot detection
#[clap(long)]
pot: Option<String>,
},
/// Extract video, playlist, album or channel data
Get {
@ -536,6 +539,7 @@ async fn main() {
music,
limit,
client_type,
pot,
} => {
let url_target = rp.query().resolve_string(&id, false).await.unwrap();
@ -555,6 +559,9 @@ async fn main() {
dl = dl.audio_tag().crop_cover();
filter = filter.no_video();
}
if let Some(pot) = pot {
dl = dl.pot(pot);
}
let dl = dl.stream_filter(filter).build();
match url_target {