用 Python 自适应抓取网页,默认绕过反爬保护,支持从单次请求到大规模并发爬取。
浏览器
Apify HN Scraper
试用Scrape Hacker News stories, comments, and discussions. Use when user asks to search HN, find Hacker News posts, monitor tech discussions, or extract HN data....
它能做什么
Scrape Hacker News using an Apify Actor via the REST API.
技能文档
Hacker News Scraper
Scrape Hacker News using an Apify Actor via the REST API.
Actor ID
0UDODOnpTkxY3Oc90
Prerequisites
APIFY_TOKENenvironment variable must be setcurlandjqmust be available
Workflow
Step 1: Confirm parameters with user
Ask what they want to scrape. Supported input fields:
searchTerms(array of strings) - keywords to searchmaxResults(integer) - max stories to returnsortBy(string) - "points", "date", or "relevance"includeComments(boolean) - include comment threads
Step 2: Run the Actor
RESULT=$(curl -s -X POST "https://api.apify.com/v2/acts/0UDODOnpTkxY3Oc90/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"searchTerms": ["TERM"], "maxResults": 30}')
echo "$RESULT" | jq '.'
Step 3: Poll and fetch (if async)
RUN_ID=$(curl -s -X POST "https://api.apify.com/v2/acts/0UDODOnpTkxY3Oc90/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"searchTerms": ["TERM"], "maxResults": 100}' | jq -r '.data.id')
curl -s "https://api.apify.com/v2/actor-runs/$RUN_ID?token=$APIFY_TOKEN" | jq -r '.data.status'
curl -s "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN" | jq '.'
Step 4: Present results
Summarize: top stories by points, comment counts, domains, trends. Offer JSON/CSV export.
Error Handling
- If APIFY_TOKEN not set:
export APIFY_TOKEN=your_token - If run FAILS: check log endpoint
相关技能
从 AdMapix API 拉取广告创意、应用、榜单和收入预估等数据,原样返回结构化 JSON。
通过一次 REST API 调用,向 10 个社交平台发布视频、图片、文字与文档。
编写、调试与调优 Playwright 测试,涵盖定位器策略、追踪诊断与 CI 友好的超时配置。
通过一个命令行工具完成多链加密货币交易、钱包管理与 AI 市场分析。
通过托管的 OAuth GraphQL 接口查询与管理 Linear 的 issue、项目、团队、周期、标签和评论。
marcindudekdev 的更多技能
浏览全部技能通过 WP-CLI 审计、清理与调优 WordPress 站点,覆盖数据库、自动加载、慢查询与前端。
Submit products to CurlShip, the bot-friendly SaaS directory. One curl command to list your product with OG tag scraping, badge-based dofollow links, and tier upgrades.
7 runnable Monte Carlo simulation tools extracted from a viral quant article. Importance sampling, particle filters, copulas, agent-based markets, variance r...
Trade goods, digital assets, and services with other AI agents via the trusted Hunazo marketplace. On-chain USDC escrow, dispute resolution, verified reviews...
Scrape Bluesky social posts via AT Protocol. Use when user asks to search Bluesky, find Bluesky posts, monitor Bluesky discussions, or extract Bluesky data....
Scrape Substack newsletters and articles. Use when user asks to search Substack, find newsletter posts, extract Substack content, or monitor Substack publica...