projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
release 2017.10.15
[youtube-dl]
/
youtube_dl
/
extractor
/
hotnewhiphop.py
diff --git
a/youtube_dl/extractor/hotnewhiphop.py
b/youtube_dl/extractor/hotnewhiphop.py
index 31e219945412398909053ff464245763a671ae19..34163725f8c9562380a3ea30a17780e599f3b0a7 100644
(file)
--- a/
youtube_dl/extractor/hotnewhiphop.py
+++ b/
youtube_dl/extractor/hotnewhiphop.py
@@
-3,16
+3,16
@@
from __future__ import unicode_literals
import base64
from .common import InfoExtractor
import base64
from .common import InfoExtractor
-from ..compat import compat_urllib_parse
from ..utils import (
ExtractorError,
HEADRequest,
sanitized_Request,
from ..utils import (
ExtractorError,
HEADRequest,
sanitized_Request,
+ urlencode_postdata,
)
class HotNewHipHopIE(InfoExtractor):
)
class HotNewHipHopIE(InfoExtractor):
- _VALID_URL = r'http
://www\.
hotnewhiphop\.com/.*\.(?P<id>.*)\.html'
+ _VALID_URL = r'http
s?://(?:www\.)?
hotnewhiphop\.com/.*\.(?P<id>.*)\.html'
_TEST = {
'url': 'http://www.hotnewhiphop.com/freddie-gibbs-lay-it-down-song.1435540.html',
'md5': '2c2cd2f76ef11a9b3b581e8b232f3d96',
_TEST = {
'url': 'http://www.hotnewhiphop.com/freddie-gibbs-lay-it-down-song.1435540.html',
'md5': '2c2cd2f76ef11a9b3b581e8b232f3d96',
@@
-35,7
+35,7
@@
class HotNewHipHopIE(InfoExtractor):
r'"contentUrl" content="(.*?)"', webpage, 'content URL')
return self.url_result(video_url, ie='Youtube')
r'"contentUrl" content="(.*?)"', webpage, 'content URL')
return self.url_result(video_url, ie='Youtube')
- reqdata =
compat_urllib_parse.urlencode
([
+ reqdata =
urlencode_postdata
([
('mediaType', 's'),
('mediaId', video_id),
])
('mediaType', 's'),
('mediaId', video_id),
])