aivarsk / scrapy-proxies

Random proxy middleware for Scrapy
MIT License
1.65k stars 409 forks source link

There has a problem when the character “@” within password #40

Open xzycn opened 6 years ago

xzycn commented 6 years ago

There has a problem when the character “@” within password, maybe we should make the regex pattern more compatible? :) Here is my solution:

parts = re.match('(\w+://)([^:]+?:.+@)?(.+)', line.strip())

instead of

parts = re.match('(\w+://)([^:]+?:[^@]+?@)?(.+)', line.strip())
aleroot commented 6 years ago

Included in my pull request to add compatibility with splash browser