[instagram] add support for tv URLs
authorRemita Amine <remitamine@gmail.com>
Sat, 21 Sep 2019 20:57:45 +0000 (21:57 +0100)
committerRemita Amine <remitamine@gmail.com>
Sat, 21 Sep 2019 20:57:45 +0000 (21:57 +0100)
youtube_dl/extractor/instagram.py

index ffd87b55f6d8bc78ab7853892ce92454b89bfe8e..b061850a187567e0d7ed18b5e64ce10e08927244 100644 (file)
@@ -22,7 +22,7 @@ from ..utils import (
 
 
 class InstagramIE(InfoExtractor):
-    _VALID_URL = r'(?P<url>https?://(?:www\.)?instagram\.com/p/(?P<id>[^/?#&]+))'
+    _VALID_URL = r'(?P<url>https?://(?:www\.)?instagram\.com/(?:p|tv)/(?P<id>[^/?#&]+))'
     _TESTS = [{
         'url': 'https://instagram.com/p/aye83DjauH/?foo=bar#abc',
         'md5': '0d2da106a9d2631273e192b372806516',
@@ -92,6 +92,9 @@ class InstagramIE(InfoExtractor):
     }, {
         'url': 'http://instagram.com/p/9o6LshA7zy/embed/',
         'only_matching': True,
+    }, {
+        'url': 'https://www.instagram.com/tv/aye83DjauH/',
+        'only_matching': True,
     }]
 
     @staticmethod