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

URL

通过提供直接 URL 抓取任意 Rakuten 页面。

您可以通过使用 rakuten 来源。API 会返回您想要的任何 Rakuten 页面 的 HTML。

请注意,目前 rakuten 该数据源仅支持 com.tw 顶级域。

请求示例

下面的示例说明如何获取 Rakuten 页面。

curl 'https://realtime.oxylabs.io/v1/queries' \\
--user 'USERNAME:PASSWORD' \\
-H 'Content-Type: application/json' \\
-d '{
        "source": "rakuten",
        "url": "https://www.rakuten.com.tw/shop/long3269806640/product/prczm32bm/?l-id=tw_search_product_thumbnail_6"
    }'
import requests
from pprint import pprint


# 结构化载荷。
payload = {
    'source': 'rakuten',
    'url': 'https://www.rakuten.com.tw/shop/long3269806640/product/prczm32bm/?l-id=tw_search_product_thumbnail_6'
}

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

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

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

请求参数值

通用

参数
描述
默认值

source

设置抓取器。

universal

url

任意页面的直接 URL(链接)。

-

render

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

-

callback_url

回调端点的 URL。 更多信息

-

user_agent_type

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

desktop

- 必填参数

最后更新于

这有帮助吗?