Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/build-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ function scanYaml(filePath: string, site: string): ManifestEntry | null {
type: argDef?.type ?? 'str',
default: argDef?.default,
required: argDef?.required ?? false,
positional: argDef?.positional === true || undefined,
help: argDef?.description ?? argDef?.help ?? '',
choices: argDef?.choices,
});
Expand Down
2 changes: 2 additions & 0 deletions src/clis/xueqiu/earnings-date.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ browser: true

args:
symbol:
positional: true
type: str
required: true
description: 股票代码,如 SH600519、SZ000858、00700
next:
type: bool
Expand Down
3 changes: 2 additions & 1 deletion src/clis/xueqiu/search.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ browser: true

args:
query:
positional: true
type: str
required: true
description: 搜索关键词,如 茅台、AAPL、腾讯
limit:
type: int
Expand All @@ -19,7 +21,6 @@ pipeline:
(async () => {
const query = ${{ args.query | json }};
const count = ${{ args.limit }};
if (!query) throw new Error('Missing argument: query');
const resp = await fetch(`https://xueqiu.com/stock/search.json?code=${encodeURIComponent(query)}&size=${count}`, {credentials: 'include'});
if (!resp.ok) throw new Error('HTTP ' + resp.status + ' Hint: Not logged in?');
const d = await resp.json();
Expand Down
2 changes: 2 additions & 0 deletions src/clis/xueqiu/stock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ browser: true

args:
symbol:
positional: true
type: str
required: true
description: 股票代码,如 SH600519、SZ000858、AAPL、00700

pipeline:
Expand Down
Loading