aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor
diff options
context:
space:
mode:
authorchristoph-heinrich <christoph-heinrich@users.noreply.github.com>2022-06-18 03:57:22 +0200
committerGitHub <noreply@github.com>2022-06-17 18:57:22 -0700
commite121e3cee731426f620e17939141018d09661fa2 (patch)
treee50f5f24229fd6bc464a71937e3b87303062868c /yt_dlp/extractor
parent7e9a61258543f64113e779f2f82fe7a29827489d (diff)
downloadhypervideo-pre-e121e3cee731426f620e17939141018d09661fa2.tar.lz
hypervideo-pre-e121e3cee731426f620e17939141018d09661fa2.tar.xz
hypervideo-pre-e121e3cee731426f620e17939141018d09661fa2.zip
[cleanup] Minor fixes (#4096)
Authored by: christoph-heinrich
Diffstat (limited to 'yt_dlp/extractor')
-rw-r--r--yt_dlp/extractor/common.py4
-rw-r--r--yt_dlp/extractor/openload.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index 080d682eb..6b5252280 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -909,7 +909,7 @@ class InfoExtractor:
dump = base64.b64encode(webpage_bytes).decode('ascii')
self._downloader.to_screen(dump)
if self.get_param('write_pages'):
- filename = self._request_dump_filename(video_id, urlh.geturl())
+ filename = self._request_dump_filename(urlh.geturl(), video_id)
self.to_screen(f'Saving request to {filename}')
with open(filename, 'wb') as outf:
outf.write(webpage_bytes)
@@ -940,7 +940,7 @@ class InfoExtractor:
if fatal:
raise ExtractorError(errmsg, cause=ve)
else:
- self.report_warning(errmsg + str(ve))
+ self.report_warning(f'{errmsg}: {ve}')
def _parse_socket_response_as_json(self, data, video_id, transform_source=None, fatal=True):
return self._parse_json(
diff --git a/yt_dlp/extractor/openload.py b/yt_dlp/extractor/openload.py
index d987cd927..22d7e1a84 100644
--- a/yt_dlp/extractor/openload.py
+++ b/yt_dlp/extractor/openload.py
@@ -216,10 +216,10 @@ class PhantomJSwrapper:
[self.exe, '--ssl-protocol=any', self._TMP_FILES['script'].name],
text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if returncode:
- raise ExtractorError(f'Executing JS failed\n:{stderr}')
+ raise ExtractorError(f'Executing JS failed:\n{stderr}')
with open(self._TMP_FILES['html'].name, 'rb') as f:
html = f.read().decode('utf-8')
self._load_cookies()
- return (html, stdout)
+ return html, stdout