Questions tagged [pytube]

For issues relating to the pytube Python library.

pytube is a lightweight, dependency-free library (and command-line utility) for downloading Videos.

Features

  • Support for Both Progressive & DASH Streams
  • Easily Register on_download_progress & on_download_complete callbacks
  • Command-line Interfaced Included
  • Caption Track Support
  • Outputs Caption Tracks to .srt format (SubRip Subtitle)
  • Ability to Capture Thumbnail URL.
  • Extensively Documented Source Code
  • No Third-Party Dependencies

Where to learn more

528 questions
-1
votes
1 answer

Why can't I get the resolution i want

This thing not download my videos in the highest resolution from pytube import YouTube link = input("video linki: \n>> ") yt = YouTube(link) video = yt.streams.get_highest_resolution() video.download() print(yt.title + " successfuly downloaded")
-1
votes
1 answer

pytube youtube video downloader not working

having trouble with this. fairly new to programming so would appreciate assistance. it works fine when running .py file, but when i try and make it into a .exe and run it (using pyinstaller) it doesnt work (using command pyinstaller --onefile…
thing
  • 1
-1
votes
1 answer

Pytube if - else

I'm trying to create a video/playlist to mp3 converter, but I don't know how to handle python for now. I would need a little help. When I insert just a video link it downloads and converts normally, but when I insert a playlist link it doesn't…
sssssKull
  • 15
  • 6
-1
votes
1 answer

how to use pytube to download Youtube playlist with numeric videos

I don`t know what is the problem in my code i wanna download youtube playlist with numeric from pytube import Playlist from tkinter import filedialog import os playlist = Playlist(input("input the link:\n")) folder_name =…
-1
votes
1 answer

Call python's object method from flask jinja2 html file

I am trying to create youtube video downloader application using pytube and flask. All is done, except that a want to call pytube's stream download method from within the html script tag. How can i do it. Here's my flask code from flask import…
-1
votes
1 answer

Issue with downloading videos with PyTube

I know that there are a few posts on this very same topic, but all of those posts are a bit old and none of them worked for me. So please, I have tried everything, upgraded Pytube, upgrading pip, switched to other versions of Pytube and Pip,…
Viridian
  • 25
  • 3
-1
votes
1 answer

Pytube AttributeError: 'NoneType' object has no attribute 'span'

Hi I have a problem with AttributeError: 'NoneType' object has no attribute 'span' I read on the StackOverflow a channel with this problem on this I found the potential solution but it still not working here was a advice to change a this: 152:…
-1
votes
2 answers

Pytube Error in Python for downloading Youtube Video

I am facing this error while making a program to download YouTube Videos using GUI (Tkinter ttk) Please somebody help me :( I tried so many stackoverflow queries but nothing helped me and even i copied the initial code from Github but error persist…
-1
votes
2 answers

pytube HTTP Not found

I am getting this error HTTP Error 404: Not Found when I run this code : from pytube import YouTube url = input("Paste URL:") urll = YouTube(url) choose = input('Choose: 4K , FHD , HD , 480p') def D4k(): if choose == '4K' : …
LastFox
  • 31
  • 3
-1
votes
1 answer

How can i access data from this class

I am trying to access res from this stream class how I can do that from pytube import YouTube youtube_url ="https://www.youtube.com/watch?v=O1sZcX-BBSA" yt = YouTube(youtube_url) mp4_streams = yt.streams.filter(file_extension='mp4',…
Ankit Kumar
  • 389
  • 3
  • 9
-1
votes
1 answer

Small discord bot with a set of working music commands, about 6 days ago the play function completely stopped functioning (more below)

It is a small discord python bot for my server with various features, which had included music commands until they stopped out of the blue without showing any error for the problem. It uses FFMpeg, and youtubeDl along with pytube to gather the song…
-1
votes
1 answer

Can I change the name when I download the file that I downloaded and saved in the code I wrote for the second time?

Today I decided to write a Youtube video downloader and I managed it without any problems. I have a question, when I download a video or sound in the code I have given below, I cannot access the first downloaded file because the name of the file…
-1
votes
1 answer

i have a code that depends on pytube but when i try to converted to exe it does not work

I had been working on a code to download videos on python and it works perfect but when I tried to make it .exe for another computer it never runs the strong that I put to converter its pyinstaller a.py and I'm also using python 3.9 I just wanted to…
-1
votes
1 answer

Download Youtube subtitles without timer using pytube

I am using pytube to download subtitles of youtube video. I want to download them without time information. I have checked their API documentation but I am unable to find option to get subtitle without timer. Following is my code. from pytube import…
user4906240
  • 605
  • 1
  • 6
  • 20
-1
votes
2 answers

Python: tkinter progress bar not updated

The progress bar in the below code is never updated, and for the method show_progress, the code starting from the if statement also never runs. I need to update the progress bar and the label downloading_progress_value whenever the download starts,…