mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 05:25:02 +03:00
[youtube] sloppy fix
This commit is contained in:
parent
aba2852f84
commit
899e2b6b2b
@ -201,7 +201,7 @@ class YouTube(VideoExtractor):
|
||||
self.js = get_content(self.html5player).replace('\n', ' ')
|
||||
|
||||
logging.debug('Loading ytInitialPlayerResponse...')
|
||||
ytInitialPlayerResponse = json.loads(re.search('ytInitialPlayerResponse\s*=\s*([^\n]+?});(\n|</script>)', video_page).group(1))
|
||||
ytInitialPlayerResponse = json.loads(re.search('ytInitialPlayerResponse\s*=\s*([^\n]+?});(\n|</script>|var )', video_page).group(1))
|
||||
|
||||
# Get the video title
|
||||
self.title = ytInitialPlayerResponse["videoDetails"]["title"]
|
||||
|
Loading…
Reference in New Issue
Block a user