UltimaScraper icon indicating copy to clipboard operation
UltimaScraper copied to clipboard

Proxy Error

Open GreyBeardy opened this issue 6 years ago • 6 comments

Hi.

I could not find any info on how to add socks5 proxy for scraping.

I get this error when I enter a proxy in the config file

2020-07-14 14:53:08,176 ERROR errors Missing dependencies for SOCKS support. Traceback (most recent call last): File "D:\sites\OnlyFans-5.1\datascraper\main_datascraper.py", line 97, in start_datascraper session = x.create_session() File "D:\sites\OnlyFans-5.1\modules\onlyfans.py", line 604, in create_session ip = session.get('https://checkip.amazonaws.com').text.strip() File "C:\Program Files\Python38\lib\site-packages\requests\sessions.py", line 546, in get return self.request('GET', url, **kwargs) File "C:\Program Files\Python38\lib\site-packages\requests\sessions.py", line 533, in request resp = self.send(prep, **send_kwargs) File "C:\Program Files\Python38\lib\site-packages\requests\sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "C:\Program Files\Python38\lib\site-packages\requests\adapters.py", line 412, in send conn = self.get_connection(request.url, proxies) File "C:\Program Files\Python38\lib\site-packages\requests\adapters.py", line 309, in get_connection proxy_manager = self.proxy_manager_for(proxy) File "C:\Program Files\Python38\lib\site-packages\requests\adapters.py", line 182, in proxy_manager_for manager = self.proxy_manager[proxy] = SOCKSProxyManager( File "C:\Program Files\Python38\lib\site-packages\requests\adapters.py", line 47, in SOCKSProxyManager raise InvalidSchema("Missing dependencies for SOCKS support.") requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.

GreyBeardy avatar Jul 14 '20 12:07 GreyBeardy

Make sure requirements are installed correctly (pip install -r requirements.txt).

SOCKS5 specifically requires pysocks to be installed.

M-rcus avatar Jul 14 '20 14:07 M-rcus

I upgraded requirements and installed pysocks but need a guide on how to make it work.

I will try to remember to enable VPN for future use.

Thank you.

GreyBeardy avatar Jul 14 '20 14:07 GreyBeardy

You need a guide for pysocks? When I installed the requirements I didn't need to do any kind of configuration with pysocks or any of the other additional packages

Are you getting another error?

docholllidae avatar Jul 14 '20 21:07 docholllidae

I think he meant to ask how to format proxy data inside config.json, which is what I wish to know as well.

"proxies": [],

zulucommander avatar Apr 25 '21 12:04 zulucommander

I think he meant to ask how to format proxy data inside config.json, which is what I wish to know as well.

"proxies": [],

Oh wow, I forgot to document it.

"socks5h://username:password@ip:port"

UltimaHoarder avatar Apr 25 '21 13:04 UltimaHoarder

Thank you!:)

zulucommander avatar Apr 25 '21 14:04 zulucommander