Nv7-GitHub / googlesearch

A Python library for scraping the Google search engine.

Home Page:https://pypi.org/project/googlesearch-python/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to use proxy

bakadesuyou opened this issue · comments

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)]

same issue. did you find any solution?

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

commented

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

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