【发布时间】:2023-02-16 15:01:48
【问题描述】:
说,我有 api api.example.com,它在 api.example.com/view/${id} 下有一个页面,它接受一个 id 并返回 json 数据,如下所示:
{
title: "foobar",
id: 34102
}
该 API 没有搜索页面。
可能的 ID 从 00001 到 99999 开始。如何搜索“foobar”并返回 34102?
我能想到的唯一选择是通过网络抓取存储所有数据,然后在其中进行搜索。但是发送 100000 个请求很可能会使我的 IP 被禁止。
谢谢。
我还没有尝试过任何东西。
【问题讨论】:
标签: javascript json api web-scraping search