mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-13 07:37:18 +08:00
fix Pornhub cookie issue
This commit is contained in:
parent
b5434b5c31
commit
41e4a7c93b
@ -116,11 +116,11 @@ class PornHubIE(InfoExtractor):
|
|||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
|
||||||
def dl_webpage(platform):
|
def dl_webpage(platform):
|
||||||
|
self._set_cookie('pornhub.com', 'age_verified', '1')
|
||||||
|
self._set_cookie('pornhub.com', 'platform', platform)
|
||||||
return self._download_webpage(
|
return self._download_webpage(
|
||||||
'http://www.pornhub.com/view_video.php?viewkey=%s' % video_id,
|
'http://www.pornhub.com/view_video.php?viewkey=%s' % video_id,
|
||||||
video_id, headers={
|
video_id)
|
||||||
'Cookie': 'age_verified=1; platform=%s' % platform,
|
|
||||||
})
|
|
||||||
|
|
||||||
webpage = dl_webpage('pc')
|
webpage = dl_webpage('pc')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user