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

Search for playlists only #22436

Closed
orena1 opened this issue Sep 17, 2019 · 2 comments
Closed

Search for playlists only #22436

orena1 opened this issue Sep 17, 2019 · 2 comments
Labels

Comments

@orena1
Copy link

@orena1 orena1 commented Sep 17, 2019

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

Question

Hi, is there a way to constrain youtube search to return only playlists?
Currently, I am doing the following:

import youtube_dl

ydl_opts = {
    'quiet': True,
    'skip_download': True,
    'forcetitle': True,
    'forceurl': True,
}
number_of_results = 100
search_for = 'Fun'

# Extracts information using the "ytsearch:string" method
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    infoSearched = ydl.extract_info("ytsearch{}:{}".format(number_of_results,search_for))

Is there something that I can add to ydl_opts so that it will return only playlists?

Thanks

@orena1 orena1 added the question label Sep 17, 2019
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Sep 17, 2019

Use youtube search URL.

@dstftw dstftw closed this Sep 17, 2019
@orena1
Copy link
Author

@orena1 orena1 commented Sep 17, 2019

@dstftw thanks, can you direct me to an example on how to do it? where do I put the url ? and can I set the number of results that I would like?
Many thanks.

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
2 participants
You can’t perform that action at this time.