aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-06-25 17:52:29 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-06-25 17:52:32 +0200
commitd662896090f454386041b4964ba5c76d6b658598 (patch)
tree238c6b9d3f48ff0ade5c590a5f3da8f44d4240e7
parentdb241e86450bd0cce9bac6f5717776ae1f526382 (diff)
downloadyoutube-dl-d662896090f454386041b4964ba5c76d6b658598.tar.xz
[googleplus] Adapt to new detail URL format
-rw-r--r--youtube_dl/extractor/googleplus.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/youtube_dl/extractor/googleplus.py b/youtube_dl/extractor/googleplus.py
index e922bd140..ff2cdeebb 100644
--- a/youtube_dl/extractor/googleplus.py
+++ b/youtube_dl/extractor/googleplus.py
@@ -46,14 +46,18 @@ class GooglePlusIE(InfoExtractor):
video_title = self._html_search_regex(r'<meta name\=\"Description\" content\=\"(.*?)[\n<"]',
webpage, 'title', default=u'NA')
- # Step 2, Stimulate clicking the image box to launch video
- video_page = self._search_regex('"(https\://plus\.google\.com/photos/.*?)",,"image/jpeg","video"\]',
+ # Step 2, Simulate clicking the image box to launch video
+ DOMAIN = 'https://plus.google.com'
+ video_page = self._search_regex(r'<a href="((?:%s)?/photos/.*?)"' % re.escape(DOMAIN),
webpage, u'video page URL')
+ if not video_page.startswith(DOMAIN):
+ video_page = DOMAIN + video_page
+
webpage = self._download_webpage(video_page, video_id, u'Downloading video page')
# Extract video links on video page
"""Extract video links of all sizes"""
- pattern = '\d+,\d+,(\d+),"(http\://redirector\.googlevideo\.com.*?)"'
+ pattern = r'\d+,\d+,(\d+),"(http\://redirector\.googlevideo\.com.*?)"'
mobj = re.findall(pattern, webpage)
if len(mobj) == 0:
raise ExtractorError(u'Unable to extract video links')