Skip to content

Commit

Permalink
[youtube] sloppy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
soimort committed Jul 23, 2024
1 parent aba2852 commit 899e2b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/you_get/extractors/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def prepare(self, **kwargs):
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"]
Expand Down

0 comments on commit 899e2b6

Please sign in to comment.