The channel Videos tab and search both parsed the page-1 continuation
token but had no way to fetch the next page. Add the next-page fetchers:
- youtube/continuation.rs (new): shared ContinuationPage + the
appendContinuationItemsAction/continuationItems unwrap + trailing-token
scan, parameterised on the container key — onResponseReceivedActions
for browse/channel, onResponseReceivedCommands for search (matches NPE).
- channel.rs: channel_videos_continuation() POSTs browse with
{continuation: token}; reuse the page-1 rich-grid item parser (factored
out as parse_rich_grid_item, now also accepting a bare
lockupViewModel/videoRenderer cell so a layout variant can't silently
return an empty page while the token keeps advancing).
- search_extractor.rs: search_continuation() POSTs search with
{continuation: token}; walk itemSectionRenderer contents via the
existing extract_item_into.
Empty/last page yields a None token so callers stop. New unit tests over
realistic continuation fixtures (bare-lockup, shelf-in-continuation,
last-page, empty body).
23 lines
787 B
Rust
23 lines
787 B
Rust
// YouTube service tree: JS deobfuscator, the InnerTube client matrix +
|
|
// request envelope, parsing helpers, itag table, and the stream / search
|
|
// / channel extractors.
|
|
|
|
pub mod channel;
|
|
pub mod client_request;
|
|
pub mod constants;
|
|
pub mod continuation;
|
|
pub mod itag;
|
|
pub mod js;
|
|
pub mod linkhandler;
|
|
pub mod parsing;
|
|
/// PoToken bot-detection hook. `stream_extractor` reads the global
|
|
/// provider via `po_token_provider()`; the Android side hasn't
|
|
/// registered a real provider yet, so streams currently flow without
|
|
/// a po_token (works until YT requires one universally). This module
|
|
/// is the designed extension point — do not delete just because the
|
|
/// provider is currently no-op.
|
|
pub mod potoken;
|
|
pub mod search_extractor;
|
|
pub mod stream_extractor;
|
|
pub mod stream_helper;
|
|
|