瀏覽代碼

[instagram] Improve _VALID_URL (Closes #7568)

Sergey M․ 9 年之前
父節點
當前提交
67446fd49b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/extractor/instagram.py

+ 1 - 1
youtube_dl/extractor/instagram.py

@@ -10,7 +10,7 @@ from ..utils import (
 
 
 class InstagramIE(InfoExtractor):
-    _VALID_URL = r'https://instagram\.com/p/(?P<id>[^/?#&]+)'
+    _VALID_URL = r'https?://(?:www\.)?instagram\.com/p/(?P<id>[^/?#&]+)'
     _TESTS = [{
         'url': 'https://instagram.com/p/aye83DjauH/?foo=bar#abc',
         'md5': '0d2da106a9d2631273e192b372806516',