ytarchive
ytarchive copied to clipboard
Fix handling Googlevideo URLs returning redirects
It seems direct googlevideo.com URLs can return plain text with intent to have you redirect, instead of redirecting you itself.
- Check the content-type header for
text/plainand assume it's a redirect URL. - Potentially recursively call the function that checks up to X times until a working URL is given.
- Move the
sqparam to the end of the URL instead of truncating the rest of the URL. Could end up never retrieving video or audio.