News Crawler Engineering
Paste the following prompt into your AI chat to install this skill:
Please follow the guide at https://skillhub.cn/install/skillhub.md to install @user_756344a1/news-crawler-engineering.
About this skill
Problem
News sources often mix list APIs, detail pages, anti-bot logic, CSR, and image loading. Treating a site as a one-off parser usually leads to missing original_source, storing column introductions as summary, loading all historical pages into memory, duplicate inserts, stopping pagination incorrectly when the API fails, and proxy blocks on overseas sites.
How It Works
This skill treats each site as one source in a long-running collection system:
- Recon first: confirm the real list API, pagination params, columnId/channel, and detail URL rule; verify title, timestamp, source, images, summary, and content.
- Choose mode: use API when it includes content; otherwise combine list API with detail pages, parse static HTML, or reverse signatures for strong anti-bot sites.
- Model first: keep lightweight fields in get_market_news_info and large fields such as content_html, images, and raw_data in get_market_news_content; use a business unique key rather than relying only on news_id.
- Extract content by priority: API blocks/paragraphs first, then scoped HTML selectors, then get_text(); separate paragraphs with \n\n and insert image placeholders at their positions.
- Incremental and backfill: derive thresholds from MAX(publish_time) per source and column, backfill 90 days without history, overlap 6 hours with history; dedupe by page, parse, upsert, and stop when a page is fully older than the threshold.
- Operational guardrails: write main and content rows in one transaction, persist failure status, alert on crash, zero success, and high failure rate, and bypass proxies explicitly for overseas endpoints.
Use Cases
- When onboarding a news source, confirm the list API, pagination params, and detail URL rules before parsing HTML blindly.
- When building a long-running news database, split lightweight fields from `content_html`, images, and `raw_data` into separate tables.
- For daily incremental collection, calculate per-column time thresholds, dedupe by page, upsert immediately, and stop when the page is fully stale.
- When scraping overseas news sites, test proxy requirements and explicitly bypass configured proxies to avoid 449 blocks.
Best For
- Backend engineers building stable pipelines for multiple news sources
- Data engineers normalizing API output into consistent tables and unique keys
- Product engineers for financial or information monitoring who need true article source separation
- Engineers reverse-engineering anti-bot sites to extract content, image positions, and retryable failures
Related Skills
An A-share market monitor using Sina Finance API for real-time quotes, price and percentage alerts, daily logging, and scheduled checks.
Turn pasted or queried Xiaohongshu notes into a research memo covering title patterns, structure, quoted comments, and follow-up angles; public lookups are optional and confirmed before paid execution.
A universal base component that automatically launches the Edge browser and connects the BrowserSkill extension, ensuring readiness for web scraping and browser automation tasks.
A fully local-run WeChat chat analysis tool with MBTI personality inference, sentiment analysis, risk detection, relationship health assessment, and conversation prediction, emphasizing privacy.