summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYen Chi Hsuan <[email protected]>2016-06-10 16:37:12 +0800
committerYen Chi Hsuan <[email protected]>2016-06-10 16:37:12 +0800
commitdaa0df9e8beac1325e5fb55d828e7a3a38e74bf6 (patch)
treeef92a50e1f6153fe266046f82bc277e741a0e5ca
parent09728d5fbc93c769b3f8971c06e9ed0bfb168b37 (diff)
downloadyoutube-dl-daa0df9e8beac1325e5fb55d828e7a3a38e74bf6.tar.gz
youtube-dl-daa0df9e8beac1325e5fb55d828e7a3a38e74bf6.zip
[youtube:user] Support another URL form
Such an URL comes from http://www.gametrailers.com/. This is originally a test case in GenericIE, but now seems all GameTrailers videos are on YouTube.
-rw-r--r--youtube_dl/extractor/youtube.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 6c9f77d95..00dd602ff 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1988,7 +1988,7 @@ class YoutubeChannelIE(YoutubePlaylistBaseInfoExtractor):
class YoutubeUserIE(YoutubeChannelIE):
IE_DESC = 'YouTube.com user videos (URL or "ytuser" keyword)'
- _VALID_URL = r'(?:(?:https?://(?:\w+\.)?youtube\.com/(?:user/)?(?!(?:attribution_link|watch|results)(?:$|[^a-z_A-Z0-9-])))|ytuser:)(?!feed/)(?P<id>[A-Za-z0-9_-]+)'
+ _VALID_URL = r'(?:(?:https?://(?:\w+\.)?youtube\.com/(?:user/|c/)?(?!(?:attribution_link|watch|results)(?:$|[^a-z_A-Z0-9-])))|ytuser:)(?!feed/)(?P<id>[A-Za-z0-9_-]+)'
_TEMPLATE_URL = 'https://www.youtube.com/user/%s/videos'
IE_NAME = 'youtube:user'
@@ -2001,6 +2001,9 @@ class YoutubeUserIE(YoutubeChannelIE):
}, {
'url': 'ytuser:phihag',
'only_matching': True,
+ }, {
+ 'url': 'https://www.youtube.com/c/gametrailers',
+ 'only_matching': True,
}]
@classmethod