mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-26 17:21:23 +01:00
Compare commits
No commits in common. "151d7b38d3d22969b2feeea2017952afa9024867" and "61bfd2bdba2787907dfab11d03ab8f5d31e4dc5b" have entirely different histories.
151d7b38d3
...
61bfd2bdba
|
@ -39,12 +39,12 @@ class GoPlayIE(InfoExtractor):
|
|||
'params': {'skip_download': True},
|
||||
'skip': 'This video is only available for registered users',
|
||||
}, {
|
||||
'url': 'https://www.goplay.be/video/1917',
|
||||
'url': 'https://www.goplay.be/video/fantastic-beasts-the-secrets-of-dumbledore',
|
||||
'info_dict': {
|
||||
'id': '40cac41d-8d29-4ef5-aa11-75047b9f0907',
|
||||
'id': '046a91f1-db9c-41ff-8652-d35881ea72c4',
|
||||
'ext': 'mp4',
|
||||
'title': '1917',
|
||||
'description': r're:Op het hoogtepunt van de Eerste Wereldoorlog krijgen twee jonge .{94}',
|
||||
'title': 'Fantastic Beasts: The Secrets of Dumbledore',
|
||||
'description': r're:Professor Albus Dumbledore ontdekt dat de duistere tovenaar .{132}',
|
||||
},
|
||||
'params': {'skip_download': True},
|
||||
'skip': 'This video is only available for registered users',
|
||||
|
@ -78,14 +78,14 @@ class GoPlayIE(InfoExtractor):
|
|||
|
||||
def _find_json(self, s):
|
||||
return self._search_json(
|
||||
r'\w+\s*:\s*', s, 'next js data', None, contains_pattern=r'\[(?s:.+)\]', default=None)
|
||||
r'\w+\s*:\s*', s, 'next js data', None, contains_pattern=r'\[(?s:.+)\]', default=[])
|
||||
|
||||
def _real_extract(self, url):
|
||||
display_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, display_id)
|
||||
|
||||
nextjs_data = traverse_obj(
|
||||
re.findall(r'<script[^>]*>\s*self\.__next_f\.push\(\s*(\[.+?\])\s*\);?\s*</script>', webpage),
|
||||
re.findall(r'<script>\s*self\.__next_f\.push\(\s*(\[.+?\])\s*\)\s*</script>', webpage),
|
||||
(..., {js_to_json}, {json.loads}, ..., {self._find_json}, ...))
|
||||
meta = traverse_obj(nextjs_data, (
|
||||
..., lambda _, v: v['meta']['path'] == urllib.parse.urlparse(url).path, 'meta', any))
|
||||
|
|
Loading…
Reference in New Issue
Block a user