try to use curl_cffi

This commit is contained in:
2024-10-05 11:21:20 +02:00
parent c2db1035c4
commit f9ce820b9f
4 changed files with 29 additions and 20 deletions
+4 -4
View File
@@ -101,8 +101,8 @@ class AppointmentRequestSender(threading.Thread):
_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))
# _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'],
@@ -124,8 +124,8 @@ class AppointmentRequestSender(threading.Thread):
# self.contact_list = filter_contacts(self.contact_list)
can_continue = None
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)