mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-12-02 05:07:55 +01:00
run flake8
This commit is contained in:
parent
57f72370c5
commit
b3fd4b155e
@ -3386,8 +3386,8 @@ class YoutubeRecommendedIE(YoutubeFeedsInfoExtractor):
|
|||||||
continuation_renderer = None
|
continuation_renderer = None
|
||||||
|
|
||||||
renderers = try_get(
|
renderers = try_get(
|
||||||
initial_data,
|
initial_data,
|
||||||
lambda x: x['contents']['twoColumnBrowseResultsRenderer']['tabs'][0]['tabRenderer']['content']['richGridRenderer']['contents'])
|
lambda x: x['contents']['twoColumnBrowseResultsRenderer']['tabs'][0]['tabRenderer']['content']['richGridRenderer']['contents'])
|
||||||
|
|
||||||
for renderer in renderers:
|
for renderer in renderers:
|
||||||
vid = try_get(renderer, lambda x: x['richItemRenderer']['content']['videoRenderer'])
|
vid = try_get(renderer, lambda x: x['richItemRenderer']['content']['videoRenderer'])
|
||||||
@ -3408,6 +3408,7 @@ class YoutubeRecommendedIE(YoutubeFeedsInfoExtractor):
|
|||||||
|
|
||||||
return videos, continuation_renderer
|
return videos, continuation_renderer
|
||||||
|
|
||||||
|
|
||||||
class YoutubeSubscriptionsIE(YoutubeFeedsInfoExtractor):
|
class YoutubeSubscriptionsIE(YoutubeFeedsInfoExtractor):
|
||||||
IE_DESC = 'YouTube.com subscriptions feed, "ytsubs" keyword (requires authentication)'
|
IE_DESC = 'YouTube.com subscriptions feed, "ytsubs" keyword (requires authentication)'
|
||||||
_VALID_URL = r'https?://(?:www\.)?youtube\.com/feed/subscriptions|:ytsubs(?:criptions)?'
|
_VALID_URL = r'https?://(?:www\.)?youtube\.com/feed/subscriptions|:ytsubs(?:criptions)?'
|
||||||
@ -3419,8 +3420,8 @@ class YoutubeSubscriptionsIE(YoutubeFeedsInfoExtractor):
|
|||||||
continuation_renderer = None
|
continuation_renderer = None
|
||||||
|
|
||||||
renderers = try_get(
|
renderers = try_get(
|
||||||
initial_data,
|
initial_data,
|
||||||
lambda x: x['contents']['twoColumnBrowseResultsRenderer']['tabs'][0]['tabRenderer']['content']['sectionListRenderer']['contents'])
|
lambda x: x['contents']['twoColumnBrowseResultsRenderer']['tabs'][0]['tabRenderer']['content']['sectionListRenderer']['contents'])
|
||||||
for renderer in renderers:
|
for renderer in renderers:
|
||||||
for item in try_get(renderer, lambda x: x['itemSectionRenderer']['contents'][0]['shelfRenderer']['content']['gridRenderer']['items']):
|
for item in try_get(renderer, lambda x: x['itemSectionRenderer']['contents'][0]['shelfRenderer']['content']['gridRenderer']['items']):
|
||||||
vid = try_get(item, lambda x: x['gridVideoRenderer'])
|
vid = try_get(item, lambda x: x['gridVideoRenderer'])
|
||||||
@ -3432,6 +3433,7 @@ class YoutubeSubscriptionsIE(YoutubeFeedsInfoExtractor):
|
|||||||
|
|
||||||
return videos, continuation_renderer
|
return videos, continuation_renderer
|
||||||
|
|
||||||
|
|
||||||
class YoutubeHistoryIE(YoutubeFeedsInfoExtractor):
|
class YoutubeHistoryIE(YoutubeFeedsInfoExtractor):
|
||||||
IE_DESC = 'Youtube watch history, ":ythistory" for short (requires authentication)'
|
IE_DESC = 'Youtube watch history, ":ythistory" for short (requires authentication)'
|
||||||
_VALID_URL = r'https?://(?:www\.)?youtube\.com/feed/history|:ythistory'
|
_VALID_URL = r'https?://(?:www\.)?youtube\.com/feed/history|:ythistory'
|
||||||
@ -3443,8 +3445,8 @@ class YoutubeHistoryIE(YoutubeFeedsInfoExtractor):
|
|||||||
continuation_renderer = None
|
continuation_renderer = None
|
||||||
|
|
||||||
renderers = try_get(
|
renderers = try_get(
|
||||||
initial_data,
|
initial_data,
|
||||||
lambda x: x['contents']['twoColumnBrowseResultsRenderer']['tabs'][0]['tabRenderer']['content']['sectionListRenderer']['contents'])
|
lambda x: x['contents']['twoColumnBrowseResultsRenderer']['tabs'][0]['tabRenderer']['content']['sectionListRenderer']['contents'])
|
||||||
for renderer in renderers:
|
for renderer in renderers:
|
||||||
vid = try_get(renderer, lambda x: x['itemSectionRenderer']['contents'][0]['videoRenderer'])
|
vid = try_get(renderer, lambda x: x['itemSectionRenderer']['contents'][0]['videoRenderer'])
|
||||||
if vid is not None:
|
if vid is not None:
|
||||||
@ -3455,6 +3457,7 @@ class YoutubeHistoryIE(YoutubeFeedsInfoExtractor):
|
|||||||
|
|
||||||
return videos, continuation_renderer
|
return videos, continuation_renderer
|
||||||
|
|
||||||
|
|
||||||
class YoutubeTruncatedURLIE(InfoExtractor):
|
class YoutubeTruncatedURLIE(InfoExtractor):
|
||||||
IE_NAME = 'youtube:truncated_url'
|
IE_NAME = 'youtube:truncated_url'
|
||||||
IE_DESC = False # Do not list
|
IE_DESC = False # Do not list
|
||||||
|
Loading…
Reference in New Issue
Block a user