From 6fb9b53e5f2e5da8af484c9b34d47d70d06f2327 Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 30 Mar 2023 04:13:04 +0200 Subject: [PATCH] Update age verified cookies name logic --- youtube_dl/extractor/pornhub.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/youtube_dl/extractor/pornhub.py b/youtube_dl/extractor/pornhub.py index 87a5673f8..d511b29f2 100644 --- a/youtube_dl/extractor/pornhub.py +++ b/youtube_dl/extractor/pornhub.py @@ -265,6 +265,11 @@ class PornHubIE(PornHubBaseIE): self._login(host) + # The age verification cookie may have a different name based on the location. + # Setting multple cookies doesn't seem to be big deal so we prefere that solution instead + # of guessing the right cookie out of an IP we don't currently have. + self._set_cookie(host, 'age_verified', '1') + if 'thumbzilla.com' in host: self._set_cookie(host, 'accessAgeDisclaimerTZ', '1') else: