1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-13 05:07:45 +08:00

fix Pornhub cookie issue

This commit is contained in:
Eitan Postavsky 2018-03-09 10:10:58 -05:00
parent b5434b5c31
commit 41e4a7c93b

View File

@ -116,11 +116,11 @@ class PornHubIE(InfoExtractor):
video_id = self._match_id(url)
def dl_webpage(platform):
self._set_cookie('pornhub.com', 'age_verified', '1')
self._set_cookie('pornhub.com', 'platform', platform)
return self._download_webpage(
'http://www.pornhub.com/view_video.php?viewkey=%s' % video_id,
video_id, headers={
'Cookie': 'age_verified=1; platform=%s' % platform,
})
video_id)
webpage = dl_webpage('pc')