aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/shared.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-07-27 23:28:01 +0700
committerSergey M․ <dstftw@gmail.com>2016-07-27 23:28:01 +0700
commit289a16b4f3c67faa230d1b05b48f0c224b3472d8 (patch)
tree76996a1213995167dd0f65a2e36084280d4c8fc8 /youtube_dl/extractor/shared.py
parent7935926baadaad1bcf5c45b1da0f3d2d8a173ce9 (diff)
[shared] Respect redirect URL (Closes #10170)
Diffstat (limited to 'youtube_dl/extractor/shared.py')
-rw-r--r--youtube_dl/extractor/shared.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/shared.py b/youtube_dl/extractor/shared.py
index e7e5f653e..6757e6ccf 100644
--- a/youtube_dl/extractor/shared.py
+++ b/youtube_dl/extractor/shared.py
@@ -37,15 +37,17 @@ class SharedIE(InfoExtractor):
def _real_extract(self, url):
video_id = self._match_id(url)
- webpage = self._download_webpage(url, video_id)
+
+ webpage, urlh = self._download_webpage_handle(url, video_id)
if '>File does not exist<' in webpage:
raise ExtractorError(
'Video %s does not exist' % video_id, expected=True)
download_form = self._hidden_inputs(webpage)
+
request = sanitized_Request(
- url, urlencode_postdata(download_form))
+ urlh.geturl(), urlencode_postdata(download_form))
request.add_header('Content-Type', 'application/x-www-form-urlencoded')
video_page = self._download_webpage(