Browse Source

[youtube] Recognize new locale-based player URLs (fixes #12885)

master-ytdl-org
Yen Chi Hsuan 8 years ago
parent
commit
e31fed95b4
No known key found for this signature in database GPG Key ID: 7F902A182457CA23
2 changed files with 7 additions and 1 deletions
  1. +6
    -0
      ChangeLog
  2. +1
    -1
      youtube_dl/extractor/youtube.py

+ 6
- 0
ChangeLog View File

@ -1,3 +1,9 @@
version <unreleased>
Extractor
* [youtube] Recognize new locale-based player URLs (#12885)
version 2017.04.26 version 2017.04.26
Core Core


+ 1
- 1
youtube_dl/extractor/youtube.py View File

@ -963,7 +963,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
def _extract_signature_function(self, video_id, player_url, example_sig): def _extract_signature_function(self, video_id, player_url, example_sig):
id_m = re.match( id_m = re.match(
r'.*?-(?P<id>[a-zA-Z0-9_-]+)(?:/watch_as3|/html5player(?:-new)?|/base)?\.(?P<ext>[a-z]+)$',
r'.*?-(?P<id>[a-zA-Z0-9_-]+)(?:/watch_as3|/html5player(?:-new)?|(?:/[a-z]{2}_[A-Z]{2})?/base)?\.(?P<ext>[a-z]+)$',
player_url) player_url)
if not id_m: if not id_m:
raise ExtractorError('Cannot identify player %r' % player_url) raise ExtractorError('Cannot identify player %r' % player_url)


Loading…
Cancel
Save