From 13bedd4d132fd5328de95ca287089886506f86ca Mon Sep 17 00:00:00 2001 From: Lei PAN Date: Fri, 12 Jan 2024 13:59:46 +0100 Subject: [PATCH] more proxies --- request_sender.py | 1 + workers/captcha_result_getter.py | 3 ++- workers/proxies_constants.py | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/request_sender.py b/request_sender.py index ddb96b5..a734c89 100644 --- a/request_sender.py +++ b/request_sender.py @@ -75,6 +75,7 @@ def on_message(ch, method, properties, body): sub_contact_list = filter_contacts(contact_list) random.shuffle(sub_contact_list) if len(sub_contact_list) > 0: + print("contact number is {}".format(len(sub_contact_list))) for con in sub_contact_list: # if not is_already_sent(con): print(con.mail) diff --git a/workers/captcha_result_getter.py b/workers/captcha_result_getter.py index 4b34278..2e693ce 100644 --- a/workers/captcha_result_getter.py +++ b/workers/captcha_result_getter.py @@ -41,7 +41,8 @@ class CaptchaResultGetter: proxy_to_use = random.choice(PROXY_LIST) print("received cookie is " + str(cookie)) try: - response = requests.get(url=HERMES_REGISTER, headers=headers, verify=False, proxies=proxy_to_use) + response = requests.get(url=HERMES_REGISTER, headers=headers, verify=False, proxies=proxy_to_use, + timeout=15) print(response.status_code) if response.status_code == 200: print(response.text) diff --git a/workers/proxies_constants.py b/workers/proxies_constants.py index 05efe6b..b00e89d 100644 --- a/workers/proxies_constants.py +++ b/workers/proxies_constants.py @@ -2,6 +2,10 @@ ES_PROXY_MOBILE = { 'http': 'http://9972280-mobile-country-ES:hex2f4xnw@109.236.94.16:13805', 'https': 'http://9972280-mobile-country-ES:hex2f4xnw@109.236.94.16:13805' } +ES_PROXY_RES = { + 'http': 'http://08241c84-655034:7jd8chsbg@185.100.233.101:39232', + 'https': 'http://08241c84-655034:7jd8chsbg@185.100.233.101:39232' +} IT_PROXY_MOBILE = { 'http': 'http://9972284-mobile-country-IT:28blddao6a@62.112.9.140:13124', @@ -26,4 +30,4 @@ DE_PROXY_RES = { } # FR_PROXY_MOBILE # FR_PROXY_RES -PROXY_LIST = [FR_PROXY_MOBILE, DE_PROXY_MOBILE, ES_PROXY_MOBILE, IT_PROXY_MOBILE] +PROXY_LIST = [FR_PROXY_MOBILE, FR_PROXY_RES, DE_PROXY_RES, DE_PROXY_MOBILE, ES_PROXY_MOBILE, IT_PROXY_MOBILE]