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
-2
votes
1 answer

AttributeError: 'Response' object has no attribute 'html'

I am trying to program a script that downloads songs from YouTube, but when I want to get first result of the YouTube search I get this error: AttributeError: 'Response' object has no attribute 'html How can I solve this? This is my code: import…
-2
votes
1 answer

I want to play a video as podcast from YouTube in program without downloading the video from YouTube in Python

As I said on the title, I want to play a video as podcast from YouTube in program without downloading the video from YouTube in Python. I did a detailed search on the internet on how to do it but I could find nothing about it.
Deezwend
  • 59
  • 7
-2
votes
1 answer

Regex error when trying to build with PyTube and Tkinter

I’m getting this error below trying to run this code. I want to build a youtube video downloader with tkinter and pytube pytube.exceptions.RegexMatchError: regex_search: could not find match for (?:v=|\/)([0-9A-Za-z_-]{11}).* from tkinter import…
-2
votes
1 answer

How to get youtube video description with pytube

When I try to get youtube video description with this code: from pytube import YouTube video = YouTube("https://www.youtube.com/watch?v=N9bLO0XY3zs&ab_channel=CompanyEggs") print (video.description()) I get Traceback (most recent call last): File…
SlazZzor
  • 3
  • 4
-2
votes
1 answer

Empty Playlists in Pytube

I was trying to work with a playlist in Pytube, but my playlist was always shown to be empty by Pytube even though there are videos in my playlist. I'm running the latest version of pytube (10.8.5). Is there any way to fix this? I've tried the regex…
-2
votes
1 answer

How to insert pytube extension on my project

my code start with: "from pytube import YouTube" an the error is: unresolved import 'pytube How can i inport pytube library?
-2
votes
1 answer

How do you get name of every video in a playlist from YouTube in Python using pytube, pafy or another module?

I am trying to make a converter for my own personal use as a project. I have been using pytube and pafy but they don't seem to get the names of the individual videos from a playlist on YouTube. Can anyone help me find a solution? (I don't have a…
-2
votes
2 answers

When I try to work with pytube, raising error, but i downloaded this module. (Python, Pytube)

import pytube url = 'https://youtu.be/xpVfcZ0ZcFM' youtube = pytube.YouTube(url) video = youtube.streams.first() video.download("C:\Lego")`` the error: #Traceback (most recent call last): File "C:/Programming/Hillel/CW/CW24/main.py", line 1, in…
-2
votes
1 answer

Opening a picture in tkinter through a class

For learning more about Python and tkinter I am writing a YouTube downloader. I have a separate window where you can add a link and press a button which should display the thumbnail and title inside my main window. Right now I just got the title…
-3
votes
1 answer

Simple Python pytube code not working anymore

This is just simple Python code that worked when I first ran it, but didn't work the next day, even though I didn't change anything: from pytube import YouTube link = "https://www.youtube.com/watch?v=6_ardA6TuX0" video = YouTube(link) yt =…
Doni
  • 1
-3
votes
3 answers

Can not retrieve likes and dislikes in youtube with the pytube module

I using pytube library However, I didn't find functions for getting likes and dislikes in YouTube video There are functions for fetching title, description, etc. but no functions for fetching channel name or number of likes i tried this code from…
-3
votes
1 answer

How to download a youtube video without audio with PyTube (mp4, good quality)

I have been troubleshooting on this for an hour or two now, sometimes guessing with certain parameters and their values with the streams.filter() method. I want to fetch a mp4 video without its audio attached. You'd think this may be easy, but it…
vanilla
  • 69
  • 1
  • 2
  • 13
-3
votes
1 answer

pytube playlist is returning empty array

Recently pytube started returning an empty playlist. What is causing this playlist to be empty? from pytube import Playlist link = 'https://www.youtube.com/watch?…
Jubiluleu
  • 61
  • 7
-4
votes
1 answer

Pytube direct video downloading without any folder

I finished a streamlit app that basically downloads video and audio using pytube, and currently, I want to deploy it so that me and the others can use it on their phones, comps, and so on. However, when I deploy it and use it from another device,…
1 2 3
34
35