fix detection of media url on youtube
This commit is contained in:
parent
d17dda5965
commit
3a79a21360
1 changed files with 2 additions and 2 deletions
|
|
@ -104,12 +104,12 @@ class VideoPage(BaseYoutubePage):
|
|||
if not text:
|
||||
continue
|
||||
|
||||
pattern = "yt.playerConfig = "
|
||||
pattern = "ytplayer.config = "
|
||||
pos = text.find(pattern)
|
||||
if pos < 0:
|
||||
continue
|
||||
|
||||
sub = text[pos+len(pattern):pos+text[pos:].find('\n')].rstrip(';')
|
||||
sub = text[pos+len(pattern):].rstrip(';\n')
|
||||
a = json.loads(sub)
|
||||
|
||||
for part in a['args']['url_encoded_fmt_stream_map'].split(','):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue