mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-28 15:46:54 +01:00
[youtube:channel] Fix automated channel detection
This commit is contained in:
parent
11bf848191
commit
31812a9e0e
@ -1631,10 +1631,11 @@ def _real_extract(self, url):
|
|||||||
video_ids = []
|
video_ids = []
|
||||||
url = 'https://www.youtube.com/channel/%s/videos' % channel_id
|
url = 'https://www.youtube.com/channel/%s/videos' % channel_id
|
||||||
channel_page = self._download_webpage(url, channel_id)
|
channel_page = self._download_webpage(url, channel_id)
|
||||||
if re.search(r'channel-header-autogenerated-label', channel_page) is not None:
|
autogenerated = re.search(r'''(?x)
|
||||||
autogenerated = True
|
class="[^"]*?(?:
|
||||||
else:
|
channel-header-autogenerated-label|
|
||||||
autogenerated = False
|
yt-channel-title-autogenerated
|
||||||
|
)[^"]*"''', channel_page) is not None
|
||||||
|
|
||||||
if autogenerated:
|
if autogenerated:
|
||||||
# The videos are contained in a single page
|
# The videos are contained in a single page
|
||||||
|
Loading…
Reference in New Issue
Block a user