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

Patch: Don't show __main__.py in program help #20303

Closed
forthrin opened this issue Mar 10, 2019 · 1 comment
Closed

Patch: Don't show __main__.py in program help #20303

forthrin opened this issue Mar 10, 2019 · 1 comment
Labels

Comments

@forthrin
Copy link

@forthrin forthrin commented Mar 10, 2019

__main__.py is shown when launching youtube-dl in alternative ways. This is somewhat unsightly.

$ alias youtube-dl='~/Downloads/youtube-dl/youtube_dl/__main__.py'
$ youtube-dl
Usage: __main__.py [OPTIONS] URL [URL...]
__main__.py: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.

$ cd ~/Downloads/youtube-dl && python -m youtube_dl
Usage: __main__.py [OPTIONS] URL [URL...]
__main__.py: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.

Patch:

diff --git a/youtube_dl/options.py b/youtube_dl/options.py
index e7d8e89..f36677b 100644
--- a/youtube_dl/options.py
+++ b/youtube_dl/options.py
@@ -126,2 +126,3 @@ def parseOpts(overrideArguments=None):
         'conflict_handler': 'resolve',
+        'prog': 'youtube-dl'
     }
  • I've verified and I assure that I'm running youtube-dl 2019.03.09
  • 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
  • Bug report (encountered problems with youtube-dl)
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 10, 2019

This is expected behavior.

@dstftw dstftw closed this Mar 10, 2019
@dstftw dstftw added the invalid label Mar 10, 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.