瀏覽代碼

Fix recognition of command without optional parts

master
JustAnotherArchivist 2 年之前
父節點
當前提交
c9400ac46f
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      ia-cdx-search

+ 1
- 1
ia-cdx-search 查看文件

@@ -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…
取消
儲存