yt-dlp

How do i convert string percentage into float

How do i convert string percentage into float Question: I am using a tkinter GUI with the yt-dlp library, when approaching to make a progress bar, I get a problem to conversing the str hook into a float I have this string "x1b[0;94m 0.0%x1b[0m" that I need to turn in to a float into this: …

Total answers: 3

Getting Youtube Audio Stream with yt_dlp, NOT using pafy

Getting Youtube Audio Stream with yt_dlp, NOT using pafy Question: I have made a GUI youtube audio player. It uses pafy, a library that gets the stream-urls of a given youtube url. This is wonderful, but pafy has 2 problems; one is that it, since at least half a year, has an error because it …

Total answers: 1

Getting the file name of downloaded video using yt-dlp

Getting the file name of downloaded video using yt-dlp Question: I’m intending to use yt-dlp to download a video and then cut the video down afterward using ffmpeg. But to be able to use ffmpeg I am going to have to know the name of the file that yt-dlp produces. I have read through their …

Total answers: 2

Can I use yt-dlp to extract only one video info from a playlist?

Can I use yt-dlp to extract only one video info from a playlist? Question: Here’s my code using Python (simplified version): import yt_dlp YDL_OPTIONS = { ‘format’: ‘bestaudio*’, ‘noplaylist’: True, } with yt_dlp.YoutubeDL(YDL_OPTIONS) as ydl: info = ydl.extract_info(url, download=False) The problem comes up when the url directs to a playlist (e.g. https://www.youtube.com/playlist?list=PLlrATfBNZ98dudnM48yfGUldqGD0S4FFb) Here’s the output: …

Total answers: 1