For the complete documentation index, see llms.txt. This page is also available as Markdown.

Dcard

使用网页爬虫API 检索 Dcard 搜索结果。通过多语言代码示例轻松集成。

dcard_search 源旨在获取 Dcard 搜索结果页面。我们可以返回你想要的任何 Dcard 页面 HTML。要查看包含已获取数据的响应示例,请下载 此示例输出 HTML 格式文件。

请求示例

下面的示例演示如何获取 Dcard 搜索结果。

curl 'https://realtime.oxylabs.io/v1/queries' \\
--user 'USERNAME:PASSWORD' \\
-H 'Content-Type: application/json' \
-d '{
        "source": "dcard_search", 
        "query": "tv"
    }'
import requests
from pprint import pprint


# Structure payload.
payload = {
    'source': 'dcard_search',
    'query': 'tv'
}

# Get response.
response = requests.request(
    'POST',
    'https://realtime.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'),
    json=payload,
)

# Instead of response with job status and results url, this will return the
# JSON response with the result.
pprint(response.json())

我们使用同步 Realtime 集成方式作为示例。如果你想使用 Proxy Endpoint 或异步 Push-Pull 集成,请参阅 集成方法 部分。

请求参数值

通用

参数
描述
默认值

source

设置爬虫。

dcard_search

query

用于搜索产品的关键词或短语。

-

render

设置为时启用 JavaScript 渲染 html. 更多信息.

-

callback_url

回调端点的 URL。 更多信息

-

user_agent_type

设备类型和浏览器。完整列表可在 此处.

desktop

- 必填参数

最后更新于

这有帮助吗?