Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possibility to skip playlist when downloading whole channel #15946

Open
inril opened this issue Mar 21, 2018 · 0 comments
Open

possibility to skip playlist when downloading whole channel #15946

inril opened this issue Mar 21, 2018 · 0 comments

Comments

@inril
Copy link

@inril inril commented Mar 21, 2018


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.03.20. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2018.03.20

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Question

Description of your issue, suggested solution and other information

Hi,

There are a couple of channels where i prefer to fetch all playlists except one, so I use links like this: https://www.youtube.com/user//playlists

On many of these channels the 'liked items' playlist can contain several thousand videos and is not wanted.
Is there an option like --reject-title for playlists? I can not seem to find one.
I have spent the last week or so reading and relearning python to make it work but it's a slow progress.
Thanks for writing clear code, btw.

my relevant (working, but slow) code so far:

def do_download(options,args): #options = ytdl_options, args = args for my script
    """check the download options and run youtube-dl"""
    with youtube_dl.YoutubeDL(options) as ydl:
        if args.playlist:
            play_dic = ydl.extract_info(args.playlist, download=False)
            #args.playlist=https://www.youtube.com/user/<anychannel>/playlists
        else:
            print "you need to specify playlist/video to download."
            print "exiting."
            return
        for entry in play_dic['entries']:
            print ""
            if not entry:
                print "ERROR: no entry found..."
                continue
            if entry.get('title') == args.skiplist or entry.get('title') == 'Liked videos':
                print "will skip playlist ", entry.get('title')
                print " with link ", entry.get('webpage_url')
                print("")
            else:
                print "list for exclusion not found"
                #download should go here
                ydl.download([entry.get('webpage_url')])

Is there a way to filter the unwanted playlist before downloading information about all the videos in that list?

Ideally; ydl.extract_info(args.playlist, download=False, skiplist='Liked videos','Other lists')
or; ydl.download(args.playlist, skiplist='Liked videos','Other lists')

Apologize it I didn't format correctly - preview doesn't seem to work with palemoon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.