網頁資料解析器 avatar
網頁資料解析器

Pricing

$35.00 / 1,000 results

Go to Apify Store
網頁資料解析器

網頁資料解析器

Developed by

Futurize Rush

Futurize Rush

Maintained by Community

繁體中文介面的簡單網頁爬蟲工具。擷取網站的標題、段落、連結、圖片、表格等資料。支援自訂 CSS 選擇器和批量收集。 如有大量網頁爬蟲需求,推薦使用 Apify 的 Web Content Crawler

0.0 (0)

Pricing

$35.00 / 1,000 results

2

3

3

Last modified

3 days ago

You can access the 網頁資料解析器 programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4# Replace '<YOUR_API_TOKEN>' with your token.
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7# Prepare the Actor input
8run_input = {
9 "startUrls": [
10 { "url": "https://apify.com/futurizerush" },
11 { "url": "https://rush.zeabur.app/" },
12 { "url": "https://www.threads.com/@futurizerush" },
13 ],
14 "maxRequestsPerCrawl": 10,
15 "maxConcurrency": 3,
16 "smartMode": True,
17 "cacheEnabled": True,
18 "extractionRules": {
19 "文章標題": "h1.post-title, h1.article-title, h1.entry-title",
20 "文章內容": "article, main, .post-content, .article-content",
21 "作者": ".author-name, .by-author, .post-author",
22 "發布日期": "time, .post-date, .publish-date",
23 "分類": ".category, .post-category",
24 "標籤": ".tags a, .post-tags a",
25 },
26 "customData": {
27 "source": "Apify Actor",
28 "scraped_by": "@futurizerush",
29 "language": "zh-TW",
30 },
31 "waitForSelector": "",
32 "scrollToBottom": False,
33 "pageLoadTimeoutSecs": 25,
34 "blockResources": [],
35}
36
37# Run the Actor and wait for it to finish
38run = client.actor("futurizerush/web-scraper-zh-tw").call(run_input=run_input)
39
40# Fetch and print Actor results from the run's dataset (if there are any)
41print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
42for item in client.dataset(run["defaultDatasetId"]).iterate_items():
43 print(item)
44
45# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

網頁資料解析器 API in Python

The Apify API client for Python is the official library that allows you to use 網頁資料解析器 API in Python, providing convenience functions and automatic retries on errors.

Install the apify-client

$pip install apify-client

Other API clients include: