aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-06-12 00:14:04 +0700
committerSergey M․ <dstftw@gmail.com>2017-06-12 00:14:04 +0700
commit16bc958287b25566dbe22d22274d4c992278d2f7 (patch)
tree6545c3769ab5a827ca3fd6616adf241112ba6bcc /youtube_dl/extractor
parent624bd0104c3c0f367ecb129c438da57398668801 (diff)
[xfileshare] Modernize and pass referrer
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/xfileshare.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/youtube_dl/extractor/xfileshare.py b/youtube_dl/extractor/xfileshare.py
index 13f8be6cb..bfec17e3c 100644
--- a/youtube_dl/extractor/xfileshare.py
+++ b/youtube_dl/extractor/xfileshare.py
@@ -130,12 +130,12 @@ class XFileShareIE(InfoExtractor):
if countdown:
self._sleep(countdown, video_id)
- post = urlencode_postdata(fields)
-
- req = sanitized_Request(url, post)
- req.add_header('Content-type', 'application/x-www-form-urlencoded')
-
- webpage = self._download_webpage(req, video_id, 'Downloading video page')
+ webpage = self._download_webpage(
+ url, video_id, 'Downloading video page',
+ data=urlencode_postdata(fields), headers={
+ 'Referer': url,
+ 'Content-type': 'application/x-www-form-urlencoded',
+ })
title = (self._search_regex(
(r'style="z-index: [0-9]+;">([^<]+)</span>',