if version don't try to create object
This commit is contained in:
parent
78a608db50
commit
7fa7b59ce3
@ -70,7 +70,11 @@ def main():
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if not args.url and not args.version:
|
||||
if args.version:
|
||||
print(__version__)
|
||||
return
|
||||
|
||||
if not args.url:
|
||||
print("Specify an URL using \"--url https://mywebiste.com\". Use --help for help.")
|
||||
return
|
||||
|
||||
@ -94,8 +98,6 @@ def main():
|
||||
_near(obj, args)
|
||||
elif args.get:
|
||||
_get(obj, args)
|
||||
elif args.version:
|
||||
print(__version__)
|
||||
else:
|
||||
print("Usage: waybackpy [OPTIONS] --url [URL...] --user_agent [USER AGENT].\
|
||||
\nwaybackpy: error: You must provide at least one URL. See --help\
|
||||
|
Loading…
Reference in New Issue
Block a user