mirror of
https://github.com/anxdpanic/plugin.video.youtube.git
synced 2025-12-05 18:20:41 -08:00
Improve robustness of fetching recommended and related videos
This commit is contained in:
parent
b585725a04
commit
a9f0436deb
1 changed files with 63 additions and 25 deletions
|
|
@ -89,23 +89,33 @@ class YouTubeDataClient(YouTubeLoginClient):
|
||||||
'tvSurfaceContentRenderer',
|
'tvSurfaceContentRenderer',
|
||||||
'content',
|
'content',
|
||||||
'sectionListRenderer',
|
'sectionListRenderer',
|
||||||
'contents',
|
(
|
||||||
0,
|
(
|
||||||
'shelfRenderer',
|
'contents',
|
||||||
'content',
|
slice(None),
|
||||||
'horizontalListRenderer',
|
None,
|
||||||
'continuations',
|
'shelfRenderer',
|
||||||
0,
|
'content',
|
||||||
'nextContinuationData',
|
('horizontalListRenderer', 'verticalListRenderer'),
|
||||||
|
'continuations',
|
||||||
|
0,
|
||||||
|
'nextContinuationData',
|
||||||
|
),
|
||||||
|
(
|
||||||
|
'continuations',
|
||||||
|
0,
|
||||||
|
'nextContinuationData'
|
||||||
|
)
|
||||||
|
),
|
||||||
),
|
),
|
||||||
'continuation_items': (
|
'continuation_items': (
|
||||||
'continuationContents',
|
'continuationContents',
|
||||||
'horizontalListContinuation',
|
('horizontalListContinuation', 'sectionListContinuation'),
|
||||||
'items',
|
'items',
|
||||||
),
|
),
|
||||||
'continuation_continuation': (
|
'continuation_continuation': (
|
||||||
'continuationContents',
|
'continuationContents',
|
||||||
'horizontalListContinuation',
|
('horizontalListContinuation', 'sectionListContinuation'),
|
||||||
'continuations',
|
'continuations',
|
||||||
0,
|
0,
|
||||||
'nextContinuationData',
|
'nextContinuationData',
|
||||||
|
|
@ -200,7 +210,7 @@ class YouTubeDataClient(YouTubeLoginClient):
|
||||||
slice(None),
|
slice(None),
|
||||||
'shelfRenderer',
|
'shelfRenderer',
|
||||||
'content',
|
'content',
|
||||||
'horizontalListRenderer',
|
('horizontalListRenderer', 'verticalListRenderer'),
|
||||||
'items',
|
'items',
|
||||||
),
|
),
|
||||||
'item_id': (
|
'item_id': (
|
||||||
|
|
@ -244,23 +254,43 @@ class YouTubeDataClient(YouTubeLoginClient):
|
||||||
'tvSurfaceContentRenderer',
|
'tvSurfaceContentRenderer',
|
||||||
'content',
|
'content',
|
||||||
'sectionListRenderer',
|
'sectionListRenderer',
|
||||||
'contents',
|
(
|
||||||
0,
|
(
|
||||||
'shelfRenderer',
|
'contents',
|
||||||
'content',
|
slice(None),
|
||||||
'horizontalListRenderer',
|
None,
|
||||||
'continuations',
|
'shelfRenderer',
|
||||||
0,
|
'content',
|
||||||
'nextContinuationData',
|
('horizontalListRenderer', 'verticalListRenderer'),
|
||||||
|
'continuations',
|
||||||
|
0,
|
||||||
|
'nextContinuationData',
|
||||||
|
),
|
||||||
|
(
|
||||||
|
'continuations',
|
||||||
|
0,
|
||||||
|
'nextContinuationData'
|
||||||
|
)
|
||||||
|
),
|
||||||
),
|
),
|
||||||
'continuation_items': (
|
'continuation_items': (
|
||||||
'continuationContents',
|
'continuationContents',
|
||||||
'horizontalListContinuation',
|
('horizontalListContinuation', 'sectionListContinuation'),
|
||||||
'items',
|
(
|
||||||
|
('items',),
|
||||||
|
(
|
||||||
|
'contents',
|
||||||
|
slice(None),
|
||||||
|
'shelfRenderer',
|
||||||
|
'content',
|
||||||
|
('horizontalListRenderer', 'verticalListRenderer'),
|
||||||
|
'items',
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
'continuation_continuation': (
|
'continuation_continuation': (
|
||||||
'continuationContents',
|
'continuationContents',
|
||||||
'horizontalListContinuation',
|
('horizontalListContinuation', 'sectionListContinuation'),
|
||||||
'continuations',
|
'continuations',
|
||||||
0,
|
0,
|
||||||
'nextContinuationData',
|
'nextContinuationData',
|
||||||
|
|
@ -282,7 +312,11 @@ class YouTubeDataClient(YouTubeLoginClient):
|
||||||
('horizontalListRenderer', 'verticalListRenderer'),
|
('horizontalListRenderer', 'verticalListRenderer'),
|
||||||
'items',
|
'items',
|
||||||
slice(None),
|
slice(None),
|
||||||
('gridVideoRenderer', 'compactVideoRenderer'),
|
(
|
||||||
|
'gridVideoRenderer',
|
||||||
|
'compactVideoRenderer',
|
||||||
|
'tileRenderer',
|
||||||
|
),
|
||||||
# 'videoId',
|
# 'videoId',
|
||||||
),
|
),
|
||||||
'continuation': (
|
'continuation': (
|
||||||
|
|
@ -307,7 +341,11 @@ class YouTubeDataClient(YouTubeLoginClient):
|
||||||
('horizontalListRenderer', 'verticalListRenderer'),
|
('horizontalListRenderer', 'verticalListRenderer'),
|
||||||
'items',
|
'items',
|
||||||
slice(None),
|
slice(None),
|
||||||
('gridVideoRenderer', 'compactVideoRenderer'),
|
(
|
||||||
|
'gridVideoRenderer',
|
||||||
|
'compactVideoRenderer',
|
||||||
|
'tileRenderer',
|
||||||
|
),
|
||||||
# 'videoId',
|
# 'videoId',
|
||||||
),
|
),
|
||||||
'continuation_continuation': (
|
'continuation_continuation': (
|
||||||
|
|
@ -1686,7 +1724,7 @@ class YouTubeDataClient(YouTubeLoginClient):
|
||||||
2,
|
2,
|
||||||
'shelfRenderer',
|
'shelfRenderer',
|
||||||
'content',
|
'content',
|
||||||
'horizontalListRenderer',
|
('horizontalListRenderer', 'verticalListRenderer'),
|
||||||
'items',
|
'items',
|
||||||
) if retry == 2 else (
|
) if retry == 2 else (
|
||||||
'contents',
|
'contents',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue