Problem with 429 error while using googlesearch liblary in python

33 views Asked by At
from googlesearch import search

query = input(": ")

for j in search(query, tld="co.in", num=1, user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36",):
    print(j)

Ok, so while running this code i get the 429 error even thought i use the user agent and i limit the num of results to 1.

I heve read the post about the 429 error and there was this one guy who did something with cookis but i'm not quite sure how to us it here.

0

There are 0 answers