Unique proxy only by IP, not IP + PORT
pioter83 opened this issue · comments
Describe the bug
Sometimes we provide our own Providers.
Some proxy providers rotate PORT and do not change IP, i.e.
monday: 1.2.3.4:8080 and 1.2.3.4:8081
tuesday: 1.2.3.4:8081
wednesday: 1.2.3.4:8080
thursday: 1.2.3.4:8080 and 1.2.3.4:8081
To Reproduce
-
DB should also contain port in UNIQUE
Class Meta:
indexes = ( (('ip', 'port'), True), )
-
jobs.py / def save_ip should contain port as well:
where(ProxyIP.ip == p.ip, ProxyIP.port == p.port)
NOT sure if that's all, all if that doesn't make as mess.