From 90ac2cf996f6066919168ce0b73d1d865f2613c3 Mon Sep 17 00:00:00 2001 From: Tristan Waddington Date: Sun, 8 Mar 2020 01:41:57 -0800 Subject: [PATCH] Address feedback --- youtube_dl/extractor/pornhub.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/pornhub.py b/youtube_dl/extractor/pornhub.py index b3885747b..53e923772 100644 --- a/youtube_dl/extractor/pornhub.py +++ b/youtube_dl/extractor/pornhub.py @@ -165,10 +165,9 @@ class PornHubIE(PornHubBaseIE): mobj = re.match(self._VALID_URL, url) host = mobj.group('host') or 'pornhub.com' video_id = mobj.group('id') - cookie_file = self._downloader.params.get('cookiefile') - if host == 'pornhubpremium.com': - if not cookie_file: + if 'premium' in host: + if not self._downloader.params.get('cookiefile'): raise ExtractorError( 'PornHub Premium requires authentication.' ' You may want to use --cookies.',