aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>2008-07-26 02:07:03 +0200
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>2010-10-31 11:23:31 +0100
commit535267857601e4962d57108d5c7a755166a4ecff (patch)
treed80f2eab20d97b31bd5f28b2e1fbb76af5dc981a
parenta7d06f400c36837923c3b0db5fbfc8d90d4a9fd7 (diff)
downloadyoutube-dl-535267857601e4962d57108d5c7a755166a4ecff.tar.xz
Improve a couple of detection strings to avoid i18n-related bugs
-rwxr-xr-xyoutube-dl6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube-dl b/youtube-dl
index b80d71f88..3f20da590 100755
--- a/youtube-dl
+++ b/youtube-dl
@@ -529,7 +529,7 @@ class YoutubeIE(InfoExtractor):
self.report_video_url(video_id, video_real_url)
# uploader
- mobj = re.search(r'More From: ([^<]*)<', video_webpage)
+ mobj = re.search(r"var watchUsername = '([^']+)';", video_webpage)
if mobj is None:
self.to_stderr(u'ERROR: unable to extract uploader nickname')
return [None]
@@ -682,7 +682,7 @@ class YoutubePlaylistIE(InfoExtractor):
_VALID_URL = r'(?:http://)?(?:\w+\.)?youtube.com/view_play_list\?p=(.+)'
_TEMPLATE_URL = 'http://www.youtube.com/view_play_list?p=%s&page=%s'
_VIDEO_INDICATOR = r'/watch\?v=(.+?)&'
- _MORE_PAGES_INDICATOR = r'class="pagerNotCurrent">Next</a>'
+ _MORE_PAGES_INDICATOR = r'/view_play_list?p=%s&amp;page=%s'
_youtube_ie = None
def __init__(self, youtube_ie, downloader=None):
@@ -727,7 +727,7 @@ class YoutubePlaylistIE(InfoExtractor):
ids_in_page.add(mobj.group(1))
video_ids.extend(list(ids_in_page))
- if self._MORE_PAGES_INDICATOR not in page:
+ if (self._MORE_PAGES_INDICATOR % (playlist_id, pagenum + 1)) not in page:
break
pagenum = pagenum + 1