diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:06:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:06:11 +0000 |
commit | fd5a06560caab95c71a2e2e805efa8d0f3a696a0 (patch) | |
tree | e1c600b8612bc4b301e2f51b875fcd835c5008cc /yt_dlp/extractor/eporner.py | |
parent | Releasing progress-linux version 2024.05.27-1~progress7.99u1. (diff) | |
download | yt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.tar.xz yt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.zip |
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/eporner.py')
-rw-r--r-- | yt_dlp/extractor/eporner.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/yt_dlp/extractor/eporner.py b/yt_dlp/extractor/eporner.py index b18a76c..2d25c6b 100644 --- a/yt_dlp/extractor/eporner.py +++ b/yt_dlp/extractor/eporner.py @@ -29,9 +29,6 @@ class EpornerIE(InfoExtractor): 'view_count': int, 'age_limit': 18, }, - 'params': { - 'proxy': '127.0.0.1:8118' - } }, { # New (May 2016) URL layout 'url': 'http://www.eporner.com/hd-porn/3YRUtzMcWn0/Star-Wars-XXX-Parody/', @@ -56,7 +53,7 @@ class EpornerIE(InfoExtractor): video_id = self._match_id(urlh.url) - hash = self._search_regex( + vid_hash = self._search_regex( r'hash\s*[:=]\s*["\']([\da-f]{32})', webpage, 'hash') title = self._og_search_title(webpage, default=None) or self._html_search_regex( @@ -64,13 +61,13 @@ class EpornerIE(InfoExtractor): # Reverse engineered from vjs.js def calc_hash(s): - return ''.join((encode_base_n(int(s[lb:lb + 8], 16), 36) for lb in range(0, 32, 8))) + return ''.join(encode_base_n(int(s[lb:lb + 8], 16), 36) for lb in range(0, 32, 8)) video = self._download_json( - 'http://www.eporner.com/xhr/video/%s' % video_id, + f'http://www.eporner.com/xhr/video/{video_id}', display_id, note='Downloading video JSON', query={ - 'hash': calc_hash(hash), + 'hash': calc_hash(vid_hash), 'device': 'generic', 'domain': 'www.eporner.com', 'fallback': 'false', @@ -78,7 +75,7 @@ class EpornerIE(InfoExtractor): if video.get('available') is False: raise ExtractorError( - '%s said: %s' % (self.IE_NAME, video['message']), expected=True) + '{} said: {}'.format(self.IE_NAME, video['message']), expected=True) sources = video['sources'] |