feat: add support for rustypipe-botguard to get PO tokens
This commit is contained in:
parent
92340056f8
commit
b90a252a5e
16 changed files with 313 additions and 100 deletions
|
|
@ -75,7 +75,7 @@ videos can be downloaded in parallel for improved performance.
|
|||
|
||||
## `vdata`: Get visitor data
|
||||
|
||||
You can use the vdata command to get a new visitor data cookie. This feature may come in
|
||||
You can use the vdata command to get a new visitor data ID. This feature may come in
|
||||
handy for testing and reproducing A/B tests.
|
||||
|
||||
## `releases` Get YouTube Music new releases
|
||||
|
|
@ -130,7 +130,7 @@ Fetch a list of all the items saved in your YouTube/YouTube Music profile.
|
|||
and `ALL_PROXY`
|
||||
- **Logging:** You can change the log level with the `RUST_LOG` environment variable, it
|
||||
is set to `info` by default
|
||||
- **Visitor data:** A custom visitor data cookie can be used with the `--vdata` flag
|
||||
- **Visitor data:** A custom visitor data ID can be used with the `--vdata` flag
|
||||
- **Authentication:** Use the commands `rustypipe login` and `rustypipe login --cookie`
|
||||
to log into your Google account using either OAuth or YouTube cookies. With the
|
||||
`--auth` flag you can use authentication for any request.
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ use rustypipe::{
|
|||
model::{
|
||||
richtext::{RichText, ToPlaintext},
|
||||
traits::YtEntity,
|
||||
ArtistId, Comment, MusicSearchResult, TrackItem, TrackType, UrlTarget, Verification,
|
||||
YouTubeItem,
|
||||
ArtistId, AudioCodec, Comment, MusicSearchResult, TrackItem, TrackType, UrlTarget,
|
||||
Verification, YouTubeItem,
|
||||
},
|
||||
param::{search_filter, ChannelVideoTab, Country, Language, StreamFilter},
|
||||
report::FileReporter,
|
||||
|
|
@ -45,7 +45,7 @@ struct Cli {
|
|||
/// Always generate a report (used for debugging)
|
||||
#[clap(long, global = true)]
|
||||
report: bool,
|
||||
/// YouTube visitor data cookie
|
||||
/// YouTube visitor data ID
|
||||
#[clap(long, global = true)]
|
||||
vdata: Option<String>,
|
||||
/// YouTube content language
|
||||
|
|
@ -299,7 +299,7 @@ enum Commands {
|
|||
#[clap(long)]
|
||||
pretty: bool,
|
||||
},
|
||||
/// Get a YouTube visitor data cookie
|
||||
/// Get a YouTube visitor data ID
|
||||
Vdata,
|
||||
/// Log in using your Google account
|
||||
Login {
|
||||
|
|
@ -925,7 +925,9 @@ async fn run() -> anyhow::Result<()> {
|
|||
let mut filter = StreamFilter::new();
|
||||
if let Some(res) = resolution {
|
||||
if res == 0 {
|
||||
filter = filter.no_video();
|
||||
filter = filter
|
||||
.no_video()
|
||||
.audio_codecs([AudioCodec::Mp4a, AudioCodec::Opus]);
|
||||
} else {
|
||||
filter = filter.video_max_res(res);
|
||||
}
|
||||
|
|
@ -1716,7 +1718,7 @@ async fn run() -> anyhow::Result<()> {
|
|||
}
|
||||
}
|
||||
Commands::Vdata => {
|
||||
let vd = rp.query().get_visitor_data().await?;
|
||||
let vd = rp.query().get_visitor_data(true).await?;
|
||||
println!("{vd}");
|
||||
}
|
||||
Commands::Login {
|
||||
|
|
|
|||
Reference in a new issue