Closed NannoSilver closed 7 months ago
I think I may have found a workaround, and it's really easy: You have to specify a range parameter at the end of the URL provided by pytubefix.
I honestly have no idea why it works, but it works.
the URL provided by this script worked for me and the download speed was back to normal:
from pytubefix import YouTube
yt = YouTube(
url='https://www.youtube.com/watch?v=0FX4jVAL1eg',
use_oauth=True,
allow_oauth_cache=True
)
url = yt.streams.get_by_itag(140).url
print(f'{url}&range=0-999999999999')
Thank you for the hint, @andrebore04 !
I am testing and for me it requests to go to a page and enter a code, and then requires login + password for a google account. That is something that does not works for my needs. I guess the same is happening for you, right?
And if I remove the auth code use_oauth=True, allow_oauth_cache=True
from the Youtube object, then it gets throttled even with the &range=0-999999999999
at the end of the URL.
Hi,
I am testing pytubefix and I am facing the same issue existing at pytube 15.0.0.
If I extract the URL to download the audio (ITAG = 140) to download the media with my browser, the download speed gets throttled by Youtube to 31 KB/s. The problem does not happen to download videos (ITAG = 22).
Here is the code to test the issue:
The code will generate two links to download. Click the links and observe the download speed for both cases.
Any idea on how to fix?