Browse Source

Fix recognition of command without optional parts

master
JustAnotherArchivist 2 years ago
parent
commit
c9400ac46f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      ia-cdx-search

+ 1
- 1
ia-cdx-search View File

@@ -72,7 +72,7 @@ async def main(query, concurrency = 1, startPage = None, numPages = None):


args = sys.argv[1:]
if len(args) not in (2, 3, 4) or args[0].lower() in ('-h', '--help') or re.search(r'(^|&)(output|limit|resumekey|showresumekey|page|shownumpages)=', args[0], re.IGNORECASE):
if not 1 <= len(args) <= 4 or args[0].lower() in ('-h', '--help') or re.search(r'(^|&)(output|limit|resumekey|showresumekey|page|shownumpages)=', args[0], re.IGNORECASE):
print('Usage: ia-cdx-search QUERY [CONCURRENCY] [PAGE NUMPAGES]', file = sys.stderr)
print('Please refer to https://github.com/internetarchive/wayback/tree/master/wayback-cdx-server for the relevant query parameters', file = sys.stderr)
print('The output, limit, resumeKey, showResumeKey, page, and showNumPages parameters must not be included.', file = sys.stderr)


Loading…
Cancel
Save