same cookie use same ip address

This commit is contained in:
2024-05-11 11:24:42 +02:00
parent 3989066d7f
commit cb0a4df5a1
6 changed files with 38 additions and 24 deletions
+5 -2
View File
@@ -97,6 +97,9 @@ class AppointmentRequestSender(threading.Thread):
self.logger.info("message count in queue is {}".format(_message_count))
_received_object = body.decode("UTF-8")
self.logger.info(f" [x] Received {_received_object}")
# 同一个COOKIES保持用同一个IP
_proxy_to_use = self.proxy_manager.get_proxy_for_appointment_request()
print("proxy to use is {}".format(_proxy_to_use))
if "glrd" in _received_object:
_received_dict = json.loads(_received_object)
js_data = JsDataPojo(glrd=_received_dict['glrd'], glvd=_received_dict['glvd'], hc=_received_dict['hc'],
@@ -120,8 +123,8 @@ class AppointmentRequestSender(threading.Thread):
self.logger.info("contact number is {}".format(len(self.contact_list)))
# self.contact_list = filter_contacts(self.contact_list)
for con in self.contact_list:
_proxy_to_use = self.proxy_manager.get_proxy_for_appointment_request()
print(_proxy_to_use)
# _proxy_to_use = self.proxy_manager.get_proxy_for_appointment_request()
# print(_proxy_to_use)
sender = Sender(_received_cookies, cookiesPublisher=self.cookiesPublisher, received_dict=_received_dict,
proxy_to_use=_proxy_to_use, logger=self.logger)
self.logger.info(con.mail)