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

URL

通过提供直接 URL 抓取任意 Petco 页面,并支持门店特定结果。

petco 数据源旨在检索任何 Petco URL 数据。

请求示例

在下面的示例中,我们发送请求以检索一个 Petco URL 示例。

curl 'https://realtime.oxylabs.io/v1/queries' \\
--user 'USERNAME:PASSWORD' \\
-H 'Content-Type: application/json' \\
-d '{
        "source": "petco",
        "url": "https://www.petco.com/shop/en/petcostore/product/pro-plan-savor-shredded-blend-beef-and-rice-adult-dog-food",
        "render": "html"
    }'
import requests
from pprint import pprint


# 结构化载荷。
payload = {
    'source': 'petco',
    'url': 'https://www.petco.com/shop/en/petcostore/product/pro-plan-savor-shredded-blend-beef-and-rice-adult-dog-food',
    'render': 'html'
}

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

# 不会返回包含作业状态和结果 url 的响应,而是返回
# 包含结果的 JSON 响应。
pprint(response.json())

请求参数值

通用

抓取 Lowe's URL 的基础设置和自定义选项。

参数
描述
默认值

source

设置抓取器。

universal

url

Petco 页面 URL。

-

render

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

-

callback_url

回调端点的 URL。 更多信息

-

user_agent_type

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

desktop

- 必填参数

本地化

将区域结果适配到特定门店。

参数
描述
类型

store_id

指定一个 Petco 门店。

整数

最后更新于

这有帮助吗?