mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
YouTube: non-greedy regex, fix #394
This commit is contained in:
parent
422a3e879f
commit
77e92dfe03
@ -129,7 +129,7 @@ class YouTube(VideoExtractor):
|
||||
else:
|
||||
# Parse video page instead
|
||||
video_page = get_content('http://www.youtube.com/watch?v=%s' % self.vid)
|
||||
ytplayer_config = json.loads(re.search('ytplayer.config\s*=\s*([^\n]+});', video_page).group(1))
|
||||
ytplayer_config = json.loads(re.search('ytplayer.config\s*=\s*([^\n]+?});', video_page).group(1))
|
||||
|
||||
self.title = ytplayer_config['args']['title']
|
||||
self.html5player = 'http:' + ytplayer_config['assets']['js']
|
||||
|
Loading…
Reference in New Issue
Block a user