1

Python requests don't connect to the proxies socks5.

c.get(URL, headers=HEADERS, proxies=dict(http="socks5://user:" + j, https="socks5://user:" + j))

Error:

requests.exceptions.InvalidURL: Failed to parse: socks5://user:13.125.104.9:1080

I have already installed requests[socks].

AkulGatori
  • 15
  • 1
  • j is a readline() from proxy list – AkulGatori Jul 14 '20 at 15:59
  • Does this answer your question? [How to make python Requests work via socks proxy](https://stackoverflow.com/questions/12601316/how-to-make-python-requests-work-via-socks-proxy) – Eli Jul 14 '20 at 16:59

1 Answers1

0

It should look like:

dict(http='socks5://user:pass@host:port',https='socks5://user:pass@host:port'))

if ur socks5 dont use user and pass use just:

dict(http='socks5://host:port',https='socks5://host:port'))
Strings
  • 76
  • 6