Skip to content

Commit

Permalink
Merge pull request #9 from rg3/master
Browse files Browse the repository at this point in the history
[pull] master from rg3:master
  • Loading branch information
pull[bot] authored Dec 16, 2018
2 parents e5db314 + c8b3751 commit f07d42c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions youtube_dl/extractor/vrv.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ def _real_extract(self, url):
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:
Expand Down

0 comments on commit f07d42c

Please sign in to comment.