Skip to content

Commit

Permalink
[youtube] fix extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
soimort committed Jul 14, 2024
1 parent 882b9c0 commit 1a928fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/you_get/extractors/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def n_to_n(js, n):
# Examples:
# yma - https://www.youtube.com/s/player/84314bef/player_ias.vflset/en_US/base.js
# Xka - https://www.youtube.com/s/player/dc0c6770/player_ias.vflset/sv_SE/base.js
f1 = match1(js, r'a\.set\("n",b\),[$\w]+\.length\|\|([$\w]+)\(""\)')
# jma - https://www.youtube.com/s/player/8d9f6215/player_ias.vflset/sv_SE/base.js
f1 = match1(js, r',[$\w]+\.length\|\|([$\w]+)\(""\)\)}};')
f1def = match1(js, r'\W%s=(function\(\w+\).+?\)});' % re.escape(f1))
n = dukpy.evaljs('(%s)("%s")' % (f1def, n))
return n
Expand Down

0 comments on commit 1a928fa

Please sign in to comment.