File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree File renamed without changes.
Original file line number Diff line number Diff line change 1- today=` date -u " +%Y-%m-%d" `
2-
1+ # today=`date -u "+%Y-%m-%d"`
2+ today= " 2025-07-08 "
33cd daily_arxiv
44# 检查文件是否已存在且行数大于20行
5- if [ -f " data/$ {today} .jsonl" ]; then
6- line_count=$( wc -l < " data/$ {today} .jsonl" )
5+ if [ -f " ../ data/{today}_AI_enhanced_ ${LANGUAGE } .jsonl" ]; then
6+ line_count=$( wc -l < " ../ data/{today}_AI_enhanced_ ${LANGUAGE } .jsonl" )
77 if [ " $line_count " -gt 20 ]; then
8- echo " 文件 data/$ {today} _AI_enhanced_${LANGUAGE} .jsonl 已存在,共 $line_count 行 (>20),跳过爬虫程序..."
8+ echo " 文件 ../ data/{today}_AI_enhanced_${LANGUAGE} .jsonl 已存在,共 $line_count 行 (>20),跳过爬虫程序..."
99 else
10- echo " 文件 data/$ {today} _AI_enhanced_${LANGUAGE} .jsonl 已存在但仅有 $line_count 行 (<=20),重新运行爬虫..."
11- scrapy crawl arxiv -o ../data/${today} _AI_enhanced_ ${LANGUAGE} .jsonl
10+ echo " 文件 ../ data/{today}_AI_enhanced_${LANGUAGE} .jsonl 已存在但仅有 $line_count 行 (<=20),重新运行爬虫..."
11+ scrapy crawl arxiv -o ../data/${today} .jsonl
1212 fi
1313else
14- echo " 文件 data/$ {today} _AI_enhanced_${LANGUAGE} .jsonl 不存在,开始运行爬虫..."
15- scrapy crawl arxiv -o ../data/${today} _AI_enhanced_ ${LANGUAGE} .jsonl
14+ echo " 文件 ../ data/{today}_AI_enhanced_${LANGUAGE} .jsonl 不存在,开始运行爬虫..."
15+ scrapy crawl arxiv -o ../data/${today} .jsonl
1616fi
1717
1818cd ../ai
You can’t perform that action at this time.
0 commit comments