feat!: generate random visitorData, remove RustyPipeQuery::get_context and YTContext<'a> from public API

This commit is contained in:
ThetaDev 2024-10-23 01:51:16 +02:00
parent 43805aca66
commit 448657bcb5
22 changed files with 99 additions and 258 deletions

View file

@ -11,13 +11,12 @@ use crate::{
use super::{
response::{self, url_endpoint::NavigationEndpoint},
ClientType, MapRespCtx, MapResponse, RustyPipeQuery, YTContext,
ClientType, MapRespCtx, MapResponse, RustyPipeQuery,
};
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
struct QResolveUrl<'a> {
context: YTContext<'a>,
struct QResolveUrl {
url: String,
}
@ -299,9 +298,7 @@ impl RustyPipeQuery {
url_path: &str,
ctype: ClientType,
) -> Result<UrlTarget, Error> {
let context = self.get_context(ctype, true, None).await;
let request_body = QResolveUrl {
context,
url: format!(
"https://{}.youtube.com{}",
match ctype {