A
A
Alexey Fobius2021-02-17 20:18:53
Python
Alexey Fobius, 2021-02-17 20:18:53

How to implement a search query in python?

I can’t find any documentation that will help me in the implementation of this “miracle”,

the point is to simply write a request in the same input()example, and the script will look for something about this in the search engine, and then return the url of sites (not all, even from the first page of Google)

I understand what is connected with this, requestsbut that's all I understand, google gave more or less the following result: https://2.python-requests.org/en/latest/but this is not quite what I need.

Or did I misunderstand something

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JokerGTS, 2021-02-18
@JokerGTS

Read how to access the google search api.
Here is a good article: https://habr.com/ru/post/421173/
If it is short, then you need to register and get an api-key on the Google website (link in the article), send a request of this kind ( https://www.googleapis .com/customsearch/v1?key={api-key}&cx={seed}&q=query) and parse the json response.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question