diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-07-01 15:48:18 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-07-01 15:49:16 +0200 |
commit | c4808c6009aef29c908139ee529f4938b7df8190 (patch) | |
tree | 5fd61ba9709b9d43854faa3bede4d1e4630186a9 /youtube_dl/extractor | |
parent | c67f584eb3cb3fe9ccb6ace6b6ed96594ca7799d (diff) |
[youtube_truncated_url] Add support for truncated watch URLs with annotations (#3178)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 6bdea1c44..ec3024cbd 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1825,10 +1825,18 @@ class YoutubeTruncatedURLIE(InfoExtractor): IE_NAME = 'youtube:truncated_url' IE_DESC = False # Do not list _VALID_URL = r'''(?x) - (?:https?://)?[^/]+/watch\?(?:feature=[a-z_]+)?$| + (?:https?://)?[^/]+/watch\?(?: + feature=[a-z_]+| + annotation_id=annotation_[^&]+ + )?$| (?:https?://)?(?:www\.)?youtube\.com/attribution_link\?a=[^&]+$ ''' + _TESTS = [{ + 'url': 'http://www.youtube.com/watch?annotation_id=annotation_3951667041', + 'only_matching': True, + }] + def _real_extract(self, url): raise ExtractorError( u'Did you forget to quote the URL? Remember that & is a meta ' |