Documentation has been updated: see help center and changelog in one place.

商品

了解如何使用 grainger_product 来源和网页爬虫 API 收集 Grainger 的产品页面数据。

grainger_product 此数据源旨在检索 Grainger 产品页面。

请求示例

在下面的示例中,我们发出请求以检索以下产品页面 1THX7.

curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "grainger_product",
        "product_id": "1THX7",
        "render": "html"
    }'

请求参数值

通用

抓取 Grainger 产品页面 的基本设置和自定义选项。

参数
说明
默认值

source

设置抓取器。

grainger_product

product_id

Grainger 产品 ID。

-

render

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

-

callback_url

回调端点的 URL。 更多信息.

-

user_agent_type

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

desktop

- 必填参数

本地化

将结果适配到特定域名

参数
说明
默认值

domain

针对不同 Grainger 区域的域名本地化。(com, com.mx, ca)

com

最后更新于

这有帮助吗?