Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using yt-dlp options in Python
#6
(Jun-29-2022, 12:26 AM)snippsat Wrote:
(Jun-28-2022, 05:34 PM)Pavel_47 Wrote: How to select such version for downloading?
Get a specific language.
yt-dlp --write-sub --sub-lang fr --skip-download https://www.arte.tv/fr/videos/104769-000-A/antonio-banderas-et-pedro-almodovar
Get all subs.
yt-dlp --write-sub --all-subs --skip-download https://www.arte.tv/fr/videos/104769-000-A/antonio-banderas-et-pedro-almodovar/
(Jun-28-2022, 05:34 PM)Pavel_47 Wrote: Does exist some document that explain how to use yt-dlp options in Python.
The original documentation is sparse,but if you search for youtube-dl embedded with python will find tutorials(eg this one ).
I have used this option many times though the years for my Norwegian Tv project and apps with Flask and Click(eg getting mp3 with Click).
Both commands (i.e. specific language and "all subtitles") get "full" French subtitles, i.e. not only Spanish is subtitled , but also French.
The subtitle file size is approximately 98 KB.
If, when playing the video online, you access the "Web Developer Tools" (if you are using Firefox), you can access the actual subtitle file (Network tab and specify vtt in the Filter field), i.e. the file which is used when the video is playing online. If you download this file, you can see that it is much smaller in size than what was downloaded using yt-dlp - around 44KB. This file contains the subtitles for Spanish only. My question is: is it possible to get this file using yt-dlp?
Reply


Messages In This Thread
Using yt-dlp options in Python - by Pavel_47 - Jun-28-2022, 04:25 PM
RE: Using yt-dlp options in Python - by Axel_Erfurt - Jun-28-2022, 04:42 PM
RE: Using yt-dlp options in Python - by Pavel_47 - Jun-28-2022, 05:21 PM
RE: Using yt-dlp options in Python - by Pavel_47 - Jun-28-2022, 05:34 PM
RE: Using yt-dlp options in Python - by snippsat - Jun-29-2022, 12:26 AM
RE: Using yt-dlp options in Python - by Pavel_47 - Jun-29-2022, 09:23 AM
RE: Using yt-dlp options in Python - by snippsat - Jun-29-2022, 11:38 AM
RE: Using yt-dlp options in Python - by Pavel_47 - Jun-29-2022, 12:30 PM
RE: Using yt-dlp options in Python - by Pavel_47 - Jun-29-2022, 12:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  getting options from a html form pgoosen 5 3,332 Jul-03-2019, 06:07 PM
Last Post: nilamo
  HTML select options from python list adi.6194 4 11,794 Oct-20-2016, 01:31 PM
Last Post: adi.6194

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020