google-play-scraper icon indicating copy to clipboard operation
google-play-scraper copied to clipboard

add proxy

Open zhajingwen opened this issue 4 years ago • 4 comments

should support us to use proxy

zhajingwen avatar Jan 07 '21 07:01 zhajingwen

I can be wrong, but i'm just trying to help.

@JoMingyu codes uses urlopen from urllib to open the web page. In the following question of stackoverflow there's an example on how to allow proxies on those calls. But, maybe there's other problems that I don't know. Maybe no one is having ip ban for scraping in the first place.

https://stackoverflow.com/questions/3168171/how-can-i-open-a-website-with-urllib-via-proxy-in-python

gabrielfiorelli avatar Sep 13 '22 14:09 gabrielfiorelli

@gabrielfiorelli thank you for your research, I will look into this in the near future. But I can't guarantee that it will be included in the next update.

kluhan avatar Sep 14 '22 16:09 kluhan

Looking at the link that @gabrielfiorelli posted I found the answer to my proxy issue in this response. Simply added this to my code and now I have no issues using this package at work.

`import urllib.request

proxy_support = urllib.request.ProxyHandler({'http' : 'http://user:pass@server:port', 'https': 'https://...'}) opener = urllib.request.build_opener(proxy_support) urllib.request.install_opener(opener)`

uppy1985 avatar Sep 28 '22 17:09 uppy1985

It's a little late, but I'll update it by this January.

JoMingyu avatar Jan 03 '23 05:01 JoMingyu