fix(youtube): bug in prior refactor (#3756)

This commit is contained in:
Dag 2023-10-15 01:13:17 +02:00 committed by GitHub
parent cf9558648e
commit 2aa52aa99a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -425,11 +425,12 @@ class YoutubeBridge extends BridgeAbstract
private function fetch($url, bool $cache = false) private function fetch($url, bool $cache = false)
{ {
$header = ['Accept-Language: en-US']; $header = ['Accept-Language: en-US'];
if ($cache) {
$ttl = 86400; $ttl = 86400;
return getSimpleHTMLDOMCached($url, $ttl, $header); $stripNewlines = false;
if ($cache) {
return getSimpleHTMLDOMCached($url, $ttl, $header, [], true, true, DEFAULT_TARGET_CHARSET, $stripNewlines);
} }
return getSimpleHTMLDOM($url, $header); return getSimpleHTMLDOM($url, $header, [], true, true, DEFAULT_TARGET_CHARSET, $stripNewlines);
} }
private function extractJsonFromHtml($html) private function extractJsonFromHtml($html)