projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
624bd01
)
[xfileshare] Modernize and pass referrer
author
Sergey M․
<dstftw@gmail.com>
Sun, 11 Jun 2017 17:14:04 +0000
(
00:14
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 11 Jun 2017 17:14:04 +0000
(
00:14
+0700)
youtube_dl/extractor/xfileshare.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/xfileshare.py
b/youtube_dl/extractor/xfileshare.py
index 13f8be6cbe365a0413be0b84d26ccd7c33b68e77..bfec17e3c96bf544216347246dd6c94dbf2c254a 100644
(file)
--- 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)
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>',
title = (self._search_regex(
(r'style="z-index: [0-9]+;">([^<]+)</span>',