有没有可能使用谷歌自定义搜索功能而不创建自己的网站?

2024-06-06 15:10:37 发布

您现在位置:Python中文网/ 问答频道 /正文

我想写一个程序,循环通过约7000个特定关键字的条目,然后在谷歌搜索该关键字。然后对于每个关键字,我想返回搜索结果的数目。最后,我想用keyword1,no\u results1,keyword2,no\u results2,…,keywordn,no\u resultsn填充一个pandas类似数据帧的结构。你知道吗

我精通python和使用网页抓取工具,如BeautifulSoupselenium。然而,我也知道,它不一定是合法的,也不符合谷歌的条款和条件使用他们的搜索引擎。你知道吗

因此,我研究了google JSON API,它似乎有点适合我的使用。然而,自称的this API目标如下:

Google Custom Search enables you to create a search engine for your website, your blog, or a collection of websites. You can configure your engine to search both web pages and images. You can fine-tune the ranking, add your own promotions and customize the look and feel of the search results. You can monetize the search by connecting your engine to your Google AdSense account.

这不是我需要的。使用谷歌自定义搜索功能而不创建自己的网站是否可能/合法?你知道吗


Tags: andofthetono程序youapi