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

Using youtube-dl as Python 3 module #16071

Closed
ghost opened this issue Apr 2, 2018 · 1 comment
Closed

Using youtube-dl as Python 3 module #16071

ghost opened this issue Apr 2, 2018 · 1 comment

Comments

@ghost
Copy link

@ghost ghost commented Apr 2, 2018

Hi

I am writing program which uses youtube-dl by calling it via shell, but i decided
it would be better to use it as python module instead, but i can't find any documentation.

For example i have code like this:

import youtube_dl

ydl_opts = {
    'format': 'bestaudio/best',
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
        'preferredquality': '320',
    }]
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['https://www.youtube.com/watch?v=BaW_jenozKc'])

I would like it to search for video by keywords on Youtube instead of passing urls to it, and to download
the file to different location.

Thank you

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 2, 2018

@dstftw dstftw closed this Apr 2, 2018
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.