mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 03:03:01 +00:00
[googleplus] Adapt to new detail URL format
This commit is contained in:
parent
db241e8645
commit
d662896090
1 changed files with 7 additions and 3 deletions
|
@ -46,14 +46,18 @@ def _real_extract(self, url):
|
||||||
video_title = self._html_search_regex(r'<meta name\=\"Description\" content\=\"(.*?)[\n<"]',
|
video_title = self._html_search_regex(r'<meta name\=\"Description\" content\=\"(.*?)[\n<"]',
|
||||||
webpage, 'title', default=u'NA')
|
webpage, 'title', default=u'NA')
|
||||||
|
|
||||||
# Step 2, Stimulate clicking the image box to launch video
|
# Step 2, Simulate clicking the image box to launch video
|
||||||
video_page = self._search_regex('"(https\://plus\.google\.com/photos/.*?)",,"image/jpeg","video"\]',
|
DOMAIN = 'https://plus.google.com'
|
||||||
|
video_page = self._search_regex(r'<a href="((?:%s)?/photos/.*?)"' % re.escape(DOMAIN),
|
||||||
webpage, u'video page URL')
|
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')
|
webpage = self._download_webpage(video_page, video_id, u'Downloading video page')
|
||||||
|
|
||||||
# Extract video links on video page
|
# Extract video links on video page
|
||||||
"""Extract video links of all sizes"""
|
"""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)
|
mobj = re.findall(pattern, webpage)
|
||||||
if len(mobj) == 0:
|
if len(mobj) == 0:
|
||||||
raise ExtractorError(u'Unable to extract video links')
|
raise ExtractorError(u'Unable to extract video links')
|
||||||
|
|
Loading…
Reference in a new issue