From 88d08c0da99fc012b20c163c2bcb861e413e4809 Mon Sep 17 00:00:00 2001 From: yumao Date: Fri, 3 Jul 2026 14:45:19 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20Phase=200=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E5=91=BD=E5=90=8D=E4=B8=8E=E4=BB=93=E5=BA=93=E5=8D=AB=E7=94=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 统一 daily-robots 命名、修正示例路径与 User-Agent,并清理 tmp 与 IDE 追踪文件。 Co-authored-by: Cursor --- .env.example | 2 +- .gitignore | 6 +++++- .idea/.gitignore | 3 --- .idea/daily-robots.iml | 9 --------- .idea/misc.xml | 2 +- .idea/modules.xml | 8 -------- .idea/vcs.xml | 2 +- bot/.env.example | 2 +- daily/news/fetch.py | 2 +- daily/skills_board.py | 2 +- tmp_check_desc.py | 14 -------------- tmp_desc_snip.txt | Bin 2406 -> 0 bytes 12 files changed, 11 insertions(+), 41 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/daily-robots.iml delete mode 100644 .idea/modules.xml delete mode 100644 tmp_check_desc.py delete mode 100644 tmp_desc_snip.txt diff --git a/.env.example b/.env.example index d8f1fd9..eef9d5b 100644 --- a/.env.example +++ b/.env.example @@ -61,7 +61,7 @@ DAILY_CN_AI_NEWS=1 # DAILY_REPORT_MODE=agent # CURSOR_API_KEY=cursor_... # CURSOR_MODEL=composer-2.5 -# DAILY_CURSOR_CWD=d:\LY\diy\skills-hot-daily +# DAILY_CURSOR_CWD=. # 新增榜对比(较昨日 Top15,供 Agent 导语/signals;列表展示 Top N) # DAILY_DELTA_COMPARE_DEPTH=15 diff --git a/.gitignore b/.gitignore index 45f5e63..854a3ef 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,8 @@ logs/ bot/.env bot/.venv/ bot/.cache/ -output \ No newline at end of file +output +__pycache__/ +*.pyc +.idea/ +tmp_* diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 26d3352..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/.idea/daily-robots.iml b/.idea/daily-robots.iml deleted file mode 100644 index d6ebd48..0000000 --- a/.idea/daily-robots.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 6f29fee..cc6eae0 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index fc70df8..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 35eb1dd..94a25f7 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/bot/.env.example b/bot/.env.example index 3cdc3a7..8e99fc9 100644 --- a/bot/.env.example +++ b/bot/.env.example @@ -5,7 +5,7 @@ WECOM_BOT_SECRET=your-bot-secret # Cursor SDK(@ 机器人后的通用任务由 Cursor 执行) CURSOR_API_KEY=cursor_... -CURSOR_CWD=d:\LY\test\tech +CURSOR_CWD=. CURSOR_MODEL=composer-2.5 CURSOR_TIMEOUT=600 diff --git a/daily/news/fetch.py b/daily/news/fetch.py index 1250f11..45230b1 100644 --- a/daily/news/fetch.py +++ b/daily/news/fetch.py @@ -22,7 +22,7 @@ from daily.news.feeds_cn import CN_AI_TITLE_KEYWORDS, CN_NEWS_CATEGORIES logger = logging.getLogger(__name__) -USER_AGENT = "Mozilla/5.0 (compatible; skills-hot-daily/1.0; +https://skills.sh)" +USER_AGENT = "Mozilla/5.0 (compatible; daily-robots/1.0; +https://skills.sh)" BROWSER_USER_AGENT = ( "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " "AppleWebKit/537.36 (KHTML, like Gecko) " diff --git a/daily/skills_board.py b/daily/skills_board.py index 71041fc..248bbf3 100644 --- a/daily/skills_board.py +++ b/daily/skills_board.py @@ -15,7 +15,7 @@ logger = logging.getLogger(__name__) Board = Literal["trending", "hot"] SKILLS_SITE = "https://www.skills.sh" -USER_AGENT = "Mozilla/5.0 (compatible; skills-hot-daily/1.0; +https://skills.sh)" +USER_AGENT = "Mozilla/5.0 (compatible; daily-robots/1.0; +https://skills.sh)" _SKILL_RE = re.compile( r'\{"source":"(?P[^"]+)","skillId":"(?P[^"]+)",' diff --git a/tmp_check_desc.py b/tmp_check_desc.py deleted file mode 100644 index ee33d62..0000000 --- a/tmp_check_desc.py +++ /dev/null @@ -1,14 +0,0 @@ -import re - -import certifi -import httpx - -url = "https://skills.sh/vercel-labs/skills/find-skills" -r = httpx.get(url, headers={"User-Agent": "Mozilla/5.0"}, timeout=20, verify=certifi.where()) -chunks = re.findall(r'self\.__next_f\.push\(\[1,"(.*?)"\]\)', r.text, re.DOTALL) -blob = "\n".join(chunks).encode("utf-8").decode("unicode_escape", errors="ignore") -for needle in ("description", "Helps users", "SKILL.md", "summary"): - print(needle, blob.count(needle)) -idx = blob.find("Helps users") -if idx >= 0: - print(blob[idx : idx + 300]) diff --git a/tmp_desc_snip.txt b/tmp_desc_snip.txt deleted file mode 100644 index 3add37325981c473f287a4db3146d0d62b91b312..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2406 zcmc(h+fKtU42FG;#7l5ZwF4W6y#ZG|Lnu3GU5nPP2q9h_`0O$|M%rZ;V~P^FQGVBd zZ2#@&$4bVsluQblv!)V>?xga>x{?dIWTxUcGsYS*LlAQ?IX;~vjNFiY>B+TpS>N&c z#$L`F*Z7Nne9sI~5Jiktu+Fe2#HMfUfLLH}d}?g<&OI?#5jxI9%q2di;38X7td)7K znEJRKf^6bAlw0W^ons*{Ff16#DuUM2P>^}?k?HABhN$XkSgXz~Om!CU{e7#x%x`nvk8Nf=I2q#^ zm6O4Fe@=H#HnAB{+o#H3&et`gPW5{`F-z;VQd}3nF$~|#{Hpa|;F$fYe;3d2uKoma SSi5iairEd}9_ry-&g2WN{-bjM