Nv7-GitHub / googlesearch

A Python library for scraping the Google search engine.
https://pypi.org/project/googlesearch-python/
MIT License
480 stars 117 forks source link

Unable to use proxy #36

Closed bakadesuyou closed 1 year ago

bakadesuyou commented 2 years ago

API_KEY = "2fdb6ced427de857f32870d733fe69b0" query = "loli" proxy = f"http://scraperapi.country_code=us:{API_KEY}@proxy-server.scraperapi.com:8001"

loli_links = [link for link in search(term=query, proxy=proxy)]

Arsh1219 commented 2 years ago

same issue. did you find any solution?

presidentofradioshack commented 1 year ago

Gonna assume it has to do with the fact that proxy is always being set to None no matter if one is being passed or not. Checkout line 39

https://github.com/Nv7-GitHub/googlesearch/blob/master/googlesearch/__init__.py#L39-L44

Nv7-GitHub commented 1 year ago

It should be set to {"http": <proxy>} right after though

presidentofradioshack commented 1 year ago

Oof my b, sometimes i swear my dyslexia kicks in lol, proxies and proxy were the same word to me until i looked super close