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

youtube-dl: store the output filename as a variable in Python #23152

Closed
PenguinEino opened this issue Nov 20, 2019 · 1 comment
Closed

youtube-dl: store the output filename as a variable in Python #23152

PenguinEino opened this issue Nov 20, 2019 · 1 comment

Comments

@PenguinEino
Copy link

@PenguinEino PenguinEino commented Nov 20, 2019

How to store the output filename and extension as a variable after downloading the movie using youtube-dl

        import youtube_dl
        url = input()
        cmd = 'youtube-dl -o ./%(playlist)s/%(title)s.%(ext)s -ci --extract-audio --audio-format mp3 --add-metadata ' + url
        subprocess.check_call(cmd.split())

I don't know this continuation

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 20, 2019

Parse it from stdout.

@dstftw dstftw closed this Nov 20, 2019
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.