]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[youtube:truncated_url] Add ?t=
authorPhilipp Hagemeister <phihag@phihag.de>
Sun, 13 Sep 2015 22:26:12 +0000 (00:26 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Sun, 13 Sep 2015 22:26:54 +0000 (00:26 +0200)
Sometimes found in links - ?t=123&v=ABCD starts the video at position 123.

youtube_dl/extractor/youtube.py

index 97ce365505f246176891a6d486f38a3f92e6f711..abacdfaed17e83f3311d8e18e660f154c3653468 100644 (file)
@@ -1970,6 +1970,7 @@ class YoutubeTruncatedURLIE(InfoExtractor):
             annotation_id=annotation_[^&]+|
             x-yt-cl=[0-9]+|
             hl=[^&]*|
+            t=[0-9]+
         )?
         |
             attribution_link\?a=[^&]+
@@ -1992,6 +1993,9 @@ class YoutubeTruncatedURLIE(InfoExtractor):
     }, {
         'url': 'https://www.youtube.com/watch?hl=en-GB',
         'only_matching': True,
+    }, {
+        'url': 'https://www.youtube.com/watch?t=2372',
+        'only_matching': True,
     }]
 
     def _real_extract(self, url):