summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/eporner.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
commit137f07c27a88b07df57df5b2cdebebe3c7722bac (patch)
tree4ebdcbea6b540f69c40ba0be6ac766008030d149 /yt_dlp/extractor/eporner.py
parentAdding debian version 2024.05.27-1. (diff)
downloadyt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.tar.xz
yt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.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.py13
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']