aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/hotnewhiphop.py
diff options
context:
space:
mode:
Diffstat (limited to 'hypervideo_dl/extractor/hotnewhiphop.py')
-rw-r--r--hypervideo_dl/extractor/hotnewhiphop.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/hypervideo_dl/extractor/hotnewhiphop.py b/hypervideo_dl/extractor/hotnewhiphop.py
index f8570cb..3007fbb 100644
--- a/hypervideo_dl/extractor/hotnewhiphop.py
+++ b/hypervideo_dl/extractor/hotnewhiphop.py
@@ -1,11 +1,7 @@
from .common import InfoExtractor
from ..compat import compat_b64decode
-from ..utils import (
- ExtractorError,
- HEADRequest,
- sanitized_Request,
- urlencode_postdata,
-)
+from ..networking import HEADRequest, Request
+from ..utils import ExtractorError, urlencode_postdata
class HotNewHipHopIE(InfoExtractor):
@@ -36,9 +32,9 @@ class HotNewHipHopIE(InfoExtractor):
('mediaType', 's'),
('mediaId', video_id),
])
- r = sanitized_Request(
+ r = Request(
'http://www.hotnewhiphop.com/ajax/media/getActions/', data=reqdata)
- r.add_header('Content-Type', 'application/x-www-form-urlencoded')
+ r.headers['Content-Type'] = 'application/x-www-form-urlencoded'
mkd = self._download_json(
r, video_id, note='Requesting media key',
errnote='Could not download media key')
@@ -50,7 +46,7 @@ class HotNewHipHopIE(InfoExtractor):
req = self._request_webpage(
redirect_req, video_id,
note='Resolving final URL', errnote='Could not resolve final URL')
- video_url = req.geturl()
+ video_url = req.url
if video_url.endswith('.html'):
raise ExtractorError('Redirect failed')