dsdanielpark / Gemini-API

The unofficial python package that returns response of Google Gemini through cookie values.
https://pypi.org/project/python-gemini-api/
MIT License
148 stars 11 forks source link

Crawlbase is not affected at all #34

Open foremtehan opened 1 month ago

foremtehan commented 1 month ago

v2.4.12

My current IP is already blocked by google (403). I tried to use the Crawlbase proxy, but it does not seem to have any effect

from gemini import Gemini

proxy_url = "http://MY_TOKEN:@smartproxy.crawlbase.com:8012" 
proxies = {"http": proxy_url, "https": proxy_url}

cookies = {}
client = Gemini(cookies=cookies, proxies=proxies, timeout=30, verify=False)
#client.session.header["crawlbaseAPI-Parameters"] = "country=US"

response = client.generate_content("Hello, Gemini. What's the weather like in Seoul today?")
print(response.payload)
 An unexpected error occurred: Gemini API Error: Response code 403
Details:
<Response [403]>

Excessive connections may have temporarily blocked your account/IP, but web UI should remain accessible.

Even if i rename crawlbase.com to something else like crawlbaqweqwese.qwqwecom, I won't get a different exception and the error is the same as above