浏览代码

[vshare] Pass Referer to download request (closes #19205, closes #19221)

Sergey M․ 6 年之前
父节点
当前提交
794c1b6e02
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/extractor/vshare.py

+ 1 - 1
youtube_dl/extractor/vshare.py

@@ -48,7 +48,7 @@ class VShareIE(InfoExtractor):
 
 
         webpage = self._download_webpage(
         webpage = self._download_webpage(
             'https://vshare.io/v/%s/width-650/height-430/1' % video_id,
             'https://vshare.io/v/%s/width-650/height-430/1' % video_id,
-            video_id)
+            video_id, headers={'Referer': url})
 
 
         title = self._html_search_regex(
         title = self._html_search_regex(
             r'<title>([^<]+)</title>', webpage, 'title')
             r'<title>([^<]+)</title>', webpage, 'title')