1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-23 14:47:49 +08:00

Update pornhub.py

This commit is contained in:
Sergey M 2018-03-09 23:54:47 +07:00 committed by GitHub
parent 41e4a7c93b
commit e13ad4c368
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,8 +115,9 @@ class PornHubIE(InfoExtractor):
def _real_extract(self, url):
video_id = self._match_id(url)
self._set_cookie('pornhub.com', 'age_verified', '1')
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,