Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using yt-dlp options in Python
#1
Hello,

Does exist some document that explain how to use yt-dlp options in Python.
There are a lot of options an it's more or less clear how to use it when using tool from command line.
With Python, these options seem less obvious.
For example when I want to download just subtitles (not video) I use this command:
yt-dlp --write-sub --sub-lang fr --skip-download https://www.arte.tv/fr/videos/104769-000...almodovar/
... and it works - only subtitles file is downloaded.

When I try to use skip-download in Python, it doesn't work.
This code downloads both subtitles and video.
import yt_dlp
links = 'https://www.arte.tv/fr/videos/104769-000-A/antonio-banderas-et-pedro-almodovar/'
ydl_opts = {'writesubtitles': True, 'skip-download': True}
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
    ydl.download([links])
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,422 Jul-03-2019, 06:07 PM
Last Post: nilamo
  HTML select options from python list adi.6194 4 12,084 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