diff options
author | Remita Amine <remitamine@gmail.com> | 2018-12-16 14:28:40 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2018-12-16 14:29:18 +0100 |
commit | c8b37510868b20b0829583557899d70db2ea6243 (patch) | |
tree | 4f8b4767a9498f88ebef4860f06a030e3ef45706 /youtube_dl/extractor/vrv.py | |
parent | 21c340b83fb41094ef59b87d52c4eb1d90d1df04 (diff) |
[vrv] fix initial state extraction
Diffstat (limited to 'youtube_dl/extractor/vrv.py')
-rw-r--r-- | youtube_dl/extractor/vrv.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/vrv.py b/youtube_dl/extractor/vrv.py index ac0819c7c..483a3be3a 100644 --- 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( - 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: |