Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytubefix #1892

Open
JuanBindez opened this issue Mar 9, 2024 · 4 comments
Open

pytubefix #1892

JuanBindez opened this issue Mar 9, 2024 · 4 comments

Comments

@JuanBindez
Copy link

Hello, an alternative to pytube is pytubefix, its fork for bug fixes and new features

pip install pytubefix

from pytubefix import YouTube
from pytubefix.cli import on_progress
     
url = input("url >")
     
yt = YouTube(url, on_progress_callback = on_progress)
print(yt.title)
     
ys = yt.streams.get_audio_only()
ys.download(mp3=True)
@partriv
Copy link

partriv commented Mar 12, 2024

Thank you, this fixes the age restriction issues.

@parvezcs16
Copy link

but it still has this error:
Error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1129)>

@partriv
Copy link

partriv commented Mar 14, 2024

but it still has this error: Error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1129)>

when do you get this error?

@tillieho
Copy link

tillieho commented Apr 1, 2024

I still have issues:

import scrapetube
from pytubefix import YouTube

path = 'C:/Users/jefre/Desktop/Youtube/Videos/Scripp/'
channelid = input("Type YouTube channel ID:\n")
list = []

url = "https://www.youtube.com/shorts/"
videos = scrapetube.get_channel(channelid, content_type="shorts")

for video in videos:
    url1 = url+str(video['videoId'])
    print(url1)
    list.append(url1)
for link in list:
    try:
        YouTube(link).streams.get_highest_resolution().download(output_path=path)
    except Exception as e:
        print(f"Error occurred: {e} Trying next...")
        continue 
print("Done!")

Output:
...
Error occurred: Video ID = O3DRRro6P98: is age restricted, and can't be accessed without logging in. Trying next...
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants