Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rotating proxies with scrapy with authentication

Tags:

python

scrapy

just a noob question but I can't seem to find the answer googling. how can i use this package https://pypi.org/project/scrapy-rotating-proxies/ if the proxy requires a user/password? do I just put it in the rotating list like that?

ROTATING_PROXY_LIST = [
    'https://username:password@proxy:port',
    'https://username:password@proxy:port',
    # ...
]

thanks

like image 218
nivekdrol Avatar asked Nov 24 '25 11:11

nivekdrol


1 Answers

what worked for me is using the rotating proxy list path:

ROTATING_PROXY_LIST_PATH = 'path/to/proxylist.txt'

and then in the text file, I have my list formatted like this:

USERNAME:PASSWORD@HOST:PORT
USERNAME:PASSWORD@HOST:PORT
USERNAME:PASSWORD@HOST:PORT
like image 170
Mubashir Avatar answered Nov 26 '25 00:11

Mubashir



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!