youtube: add channel + search continuation (pagination) extractors
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).
This commit is contained in:
parent
93aebbd57a
commit
820daec026
4 changed files with 427 additions and 64 deletions
|
|
@ -5,6 +5,7 @@
|
|||
pub mod channel;
|
||||
pub mod client_request;
|
||||
pub mod constants;
|
||||
pub mod continuation;
|
||||
pub mod itag;
|
||||
pub mod js;
|
||||
pub mod linkhandler;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue