projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
21c340b
)
[vrv] fix initial state extraction
author
Remita Amine
<remitamine@gmail.com>
Sun, 16 Dec 2018 13:28:40 +0000
(14:28 +0100)
committer
Remita Amine
<remitamine@gmail.com>
Sun, 16 Dec 2018 13:29:18 +0000
(14:29 +0100)
youtube_dl/extractor/vrv.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/vrv.py
b/youtube_dl/extractor/vrv.py
index ac0819c7c10a9bc0db09b76993a4c79c08a02c4b..483a3be3a8c1f1b0c557c308a86bd7d55de82bdd 100644
(file)
--- a/
youtube_dl/extractor/vrv.py
+++ b/
youtube_dl/extractor/vrv.py
@@
-120,8
+120,10
@@
class VRVIE(VRVBaseIE):
url, video_id,
headers=self.geo_verification_headers())
media_resource = self._parse_json(self._search_regex(
url, video_id,
headers=self.geo_verification_headers())
media_resource = self._parse_json(self._search_regex(
- r'window\.__INITIAL_STATE__\s*=\s*({.+?})</script>',
- webpage, 'inital state'), video_id).get('watch', {}).get('mediaResource') or {}
+ [
+ r'window\.__INITIAL_STATE__\s*=\s*({.+?})(?:</script>|;)',
+ r'window\.__INITIAL_STATE__\s*=\s*({.+})'
+ ], webpage, 'inital state'), video_id).get('watch', {}).get('mediaResource') or {}
video_data = media_resource.get('json')
if not video_data:
video_data = media_resource.get('json')
if not video_data: