Don't generate URL and headers separately

Fixes https://github.com/Rudloff/alltube/issues/354
This commit is contained in:
Pierre Rudloff 2021-05-13 12:31:50 +02:00
parent ed54198684
commit f556c7d589

View file

@ -476,11 +476,10 @@ class Downloader implements LoggerAwareInterface
{
// IDN conversion breaks with Google hosts like https://r3---sn-25glene6.googlevideo.com/.
$client = new Client(['idn_conversion' => false]);
$urls = $video->getUrl();
return $client->request(
'GET',
$urls[0],
$video->url,
[
'stream' => true,
'headers' => array_merge((array)$video->http_headers, $headers)