Browse Source

[xfileshare] Modernize and pass referrer

master-ytdl-org
Sergey M․ 8 years ago
parent
commit
16bc958287
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      youtube_dl/extractor/xfileshare.py

+ 6
- 6
youtube_dl/extractor/xfileshare.py View File

@ -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>',


Loading…
Cancel
Save