bug 修复
This commit is contained in:
@@ -21,7 +21,7 @@ SRE Weekly 抓取与文章提取脚本
|
||||
|
||||
用法:
|
||||
python3 sreweekly.py # 扫描 feed,新增期保存为 HTML 并登记 manifest
|
||||
python3 sreweekly.py --check # 只检查有无新期,输出 NEW:533,532 或 NONE(供 n8n 分支)
|
||||
python3 sreweekly.py --check # 只检查有无新期,输出 533,532 或 NONE(供 n8n 分支)
|
||||
python3 sreweekly.py --extract ID # 提取指定期(如 533)的文章 → markdown(默认抓正文)
|
||||
python3 sreweekly.py --extract 433..464 # 提取期号区间(只处理 manifest 中已登记的期)
|
||||
python3 sreweekly.py --extract latest # 提取最新一期
|
||||
@@ -236,7 +236,7 @@ def cmd_check(args, manifest):
|
||||
if iid not in known:
|
||||
new_ids.append(iid)
|
||||
if new_ids:
|
||||
print("NEW:" + ",".join(new_ids))
|
||||
print(",".join(new_ids))
|
||||
else:
|
||||
print("NONE")
|
||||
return 0
|
||||
@@ -591,7 +591,7 @@ def main():
|
||||
ap = argparse.ArgumentParser(description="SRE Weekly 抓取 + 文章提取(供 n8n 定时调用)")
|
||||
ap.add_argument("--feed", default=DEFAULT_FEED, help=f"RSS 地址(默认 {DEFAULT_FEED})")
|
||||
ap.add_argument("--dir", default=DEFAULT_DIR, help=f"工作目录(默认 {DEFAULT_DIR})")
|
||||
ap.add_argument("--check", action="store_true", help="只检查有无新期,输出 NEW:id,id 或 NONE")
|
||||
ap.add_argument("--check", action="store_true", help="只检查有无新期,输出 id,id 或 NONE")
|
||||
ap.add_argument("--extract", metavar="ID|FROM..TO|latest|pending|all", help="提取文章 → markdown(支持区间如 433..464)")
|
||||
ap.add_argument("--backfill", metavar="FROM..TO", help="回溯抓取指定期号区间(绕过 RSS 限制,例:--backfill 400..500)")
|
||||
ap.add_argument("--status", action="store_true", help="打印 manifest 状态表")
|
||||
|
||||
Reference in New Issue
Block a user