projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
100bd86
)
[youtube:playlist] Extend _VALID_URL
author
Sergey M․
<dstftw@gmail.com>
Sun, 4 Sep 2016 13:12:34 +0000
(20:12 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 4 Sep 2016 13:12:34 +0000
(20:12 +0700)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 0bc85af74e631c21136e951d3a6f3d97ed8dd3d0..8fc26bd02cc4d3598eda3015fbc4a3f01d915896 100644
(file)
--- a/
youtube_dl/extractor/youtube.py
+++ b/
youtube_dl/extractor/youtube.py
@@
-264,7
+264,7
@@
class YoutubeIE(YoutubeBaseInfoExtractor):
)
)? # all until now is optional -> you can pass the naked ID
([0-9A-Za-z_-]{11}) # here is it! the YouTube video ID
)
)? # all until now is optional -> you can pass the naked ID
([0-9A-Za-z_-]{11}) # here is it! the YouTube video ID
- (?!.*?
&
list=) # combined list/video URLs are handled by the playlist IE
+ (?!.*?
\b
list=) # combined list/video URLs are handled by the playlist IE
(?(1).+)? # if we found the ID, everything can follow
$"""
_NEXT_URL_RE = r'[\?&]next_url=([^&]+)'
(?(1).+)? # if we found the ID, everything can follow
$"""
_NEXT_URL_RE = r'[\?&]next_url=([^&]+)'
@@
-1778,11
+1778,14
@@
class YoutubePlaylistIE(YoutubePlaylistBaseInfoExtractor):
_VALID_URL = r"""(?x)(?:
(?:https?://)?
(?:\w+\.)?
_VALID_URL = r"""(?x)(?:
(?:https?://)?
(?:\w+\.)?
- youtube\.com/
(?:
(?:
- (?:course|view_play_list|my_playlists|artist|playlist|watch|embed/videoseries)
- \? (?:.*?[&;])*? (?:p|a|list)=
- | p/
+ youtube\.com/
+ (?:
+ (?:course|view_play_list|my_playlists|artist|playlist|watch|embed/videoseries)
+ \? (?:.*?[&;])*? (?:p|a|list)=
+ | p/
+ )|
+ youtu\.be/[0-9A-Za-z_-]{11}\?.*?\blist=
)
(
(?:PL|LL|EC|UU|FL|RD|UL)?[0-9A-Za-z-_]{10,}
)
(
(?:PL|LL|EC|UU|FL|RD|UL)?[0-9A-Za-z-_]{10,}
@@
-1887,6
+1890,9
@@
class YoutubePlaylistIE(YoutubePlaylistBaseInfoExtractor):
'skip_download': True,
},
'add_ie': [YoutubeIE.ie_key()],
'skip_download': True,
},
'add_ie': [YoutubeIE.ie_key()],
+ }, {
+ 'url': 'https://youtu.be/uWyaPkt-VOI?list=PL9D9FC436B881BA21',
+ 'only_matching': True,
}]
def _real_initialize(self):
}]
def _real_initialize(self):