1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-12-20 23:18:57 +00:00
This commit is contained in:
c-basalt
2024-12-30 17:09:47 -05:00
parent 96c6cdeec4
commit fb474064ee
4 changed files with 83 additions and 84 deletions

View File

@@ -173,12 +173,12 @@ class PhantomJSJSI(ExternalJSI):
'std_var': f'__stdout__values_{random_string()}',
'jscode': jscode,
}
return self._execute_html(jscode, location, html, cookiejar, video_id=video_id, note=note)[1]
return self._execute_html(jscode, location, html, cookiejar, video_id=video_id, note=note)[1].strip()
if html:
self.report_warning('`location` is required to use `html`')
if cookiejar:
self.report_warning('`location` and `html` are required to use `cookiejar`')
return self._execute(jscode, video_id, note=note)
return self._execute(jscode, video_id, note=note).strip()
class PhantomJSwrapper: