blackjack4494 / youtube-dlc

Command-line program to download various media from YouTube.com and other sites
https://blackjack4494.github.io/youtube-dlc/
The Unlicense
1.22k stars 13 forks source link

Skip playlists from other channels #147

Closed Geonode458 closed 4 years ago

Geonode458 commented 4 years ago

How can i download all playlists of a channel expect the ones that don't have videos from the channel owner. For example skip "Liked Videos" playlist.

blackjack4494 commented 4 years ago

@Taurus3ye good question. There is --match-filter which you could use tho I haven't used it myself yet.
I believe you need to specify the uploader (don't think you can use wildcard on command line for that) like
--match-filter "uploader = 'Some Uploader'"

However if you embed youtube-dlc into a python program you should be able to use the uploader as a variable like this

with youtube_dlc.YoutubeDL(ydlc_opts) as ydlc_uploader:
    meta = ydlc_uploader.extract_info(
        'some_fancy_link', download=False) 

print(meta['uploader'])

ydlc_opts_uploader = {
    'match_filter': 'uploader = ' + meta['uploader']
    }

with youtube_dlc.YoutubeDL(ydlc_opts_uploader) as ydlc:
    ydlc.download(['some_fancy_link_and_more'])
Geonode458 commented 4 years ago

@blackjack4494 Thx will try