summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPhilipp Hagemeister <[email protected]>2013-12-08 07:30:42 +0100
committerPhilipp Hagemeister <[email protected]>2013-12-08 07:30:42 +0100
commit31812a9e0e13925bc4d266a6d8eff779e10816c5 (patch)
tree5b86df0468585f95ac9bcf4570924a4905f3a5fc
parent11bf848191e6a2859f2e53dd7639305e0446e821 (diff)
downloadyoutube-dl-31812a9e0e13925bc4d266a6d8eff779e10816c5.tar.gz
youtube-dl-31812a9e0e13925bc4d266a6d8eff779e10816c5.zip
[youtube:channel] Fix automated channel detection
-rw-r--r--youtube_dl/extractor/youtube.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 01715024c..35121e6e5 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1631,10 +1631,11 @@ class YoutubeChannelIE(InfoExtractor):
video_ids = []
url = 'https://www.youtube.com/channel/%s/videos' % channel_id
channel_page = self._download_webpage(url, channel_id)
- if re.search(r'channel-header-autogenerated-label', channel_page) is not None:
- autogenerated = True
- else:
- autogenerated = False
+ autogenerated = re.search(r'''(?x)
+ class="[^"]*?(?:
+ channel-header-autogenerated-label|
+ yt-channel-title-autogenerated
+ )[^"]*"''', channel_page) is not None
if autogenerated:
# The videos are contained in a single page