diff options
author | Eitan Postavsky <35902204+epostavs@users.noreply.github.com> | 2018-03-09 11:57:32 -0500 |
---|---|---|
committer | Sergey M <dstftw@gmail.com> | 2018-03-09 23:57:32 +0700 |
commit | a7298f3e99c8373d8c60be42f00d3b978d9b176a (patch) | |
tree | 7d233606400fd49ad4e8c035b7ab87bdf8db748a /youtube_dl/extractor/pornhub.py | |
parent | 5d49d879cc59beb417d04db17b2f18bb438b52e2 (diff) |
[pornhub] Don't override session cookies (closes #15697)
Diffstat (limited to 'youtube_dl/extractor/pornhub.py')
-rw-r--r-- | youtube_dl/extractor/pornhub.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/youtube_dl/extractor/pornhub.py b/youtube_dl/extractor/pornhub.py index 281a4f05e..a7099bbbf 100644 --- a/youtube_dl/extractor/pornhub.py +++ b/youtube_dl/extractor/pornhub.py @@ -114,13 +114,14 @@ 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', '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') |