support ip_country field
This commit is contained in:
+13
-8
@@ -6,10 +6,11 @@ from http.cookies import SimpleCookie
|
|||||||
from db.mongo_manager import MONGO_STORE_MANAGER
|
from db.mongo_manager import MONGO_STORE_MANAGER
|
||||||
from excel_reader import read_contacts
|
from excel_reader import read_contacts
|
||||||
from models.contact_pojo import ContactPojo
|
from models.contact_pojo import ContactPojo
|
||||||
from queue_message.CookiesPublisher import CookiesPublisher
|
from queue_message.CookiesPublisher import CookiesPublisher, REQUEST_DATA_QUEUE_DE
|
||||||
from queue_message.appointmentrequestsendor import AppointmentRequestSendor
|
from queue_message.appointmentrequestsendor import AppointmentRequestSendor
|
||||||
from utiles import is_time_between
|
from utiles import is_time_between
|
||||||
from workers.captcha_result_getter import CaptchaResultGetter, HERMES_REGISTER
|
from workers.captcha_result_getter import CaptchaResultGetter, HERMES_REGISTER
|
||||||
|
from workers.proxies_constants import PROXY_LIST_DE
|
||||||
from workers.sender import Sender
|
from workers.sender import Sender
|
||||||
|
|
||||||
IPFIY = 'http://api.ipify.org'
|
IPFIY = 'http://api.ipify.org'
|
||||||
@@ -70,11 +71,15 @@ def is_open():
|
|||||||
return is_time_between(datetime.time(10, 30), datetime.time(19, 00))
|
return is_time_between(datetime.time(10, 30), datetime.time(19, 00))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def send_appointment_request(message_queue_name, contacts_file_path):
|
||||||
REQUEST_DATA_QUEUE_DE = 'REQUEST_DATA_DE'
|
_cookiesPublisher = CookiesPublisher(queue_name=message_queue_name)
|
||||||
cookiesPublisher = CookiesPublisher(queue_name=REQUEST_DATA_QUEUE_DE)
|
_cookiesPublisher.set_up_connection()
|
||||||
cookiesPublisher.set_up_connection()
|
contact_list = read_contacts(contacts_file_path)
|
||||||
contact_list = read_contacts('/Users/lpan/Desktop/08_01_24_valid_de.xlsx')
|
receiver = AppointmentRequestSendor(sub_contact_list=contact_list, proxy_to_use_list=PROXY_LIST_DE,
|
||||||
receiver = AppointmentRequestSendor(sub_contact_list=contact_list, queue_name=REQUEST_DATA_QUEUE_DE,
|
queue_name=REQUEST_DATA_QUEUE_DE,
|
||||||
cookiesPublisher=cookiesPublisher)
|
cookiesPublisher=_cookiesPublisher)
|
||||||
receiver.run()
|
receiver.run()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
send_appointment_request(REQUEST_DATA_QUEUE_DE, '/Users/lpan/Desktop/08_01_24_valid_de.xlsx')
|
||||||
|
|||||||
@@ -12,14 +12,24 @@ IT_PROXY_MOBILE = {
|
|||||||
'https': 'http://9972284-mobile-country-IT:28blddao6a@62.112.9.140:13124'
|
'https': 'http://9972284-mobile-country-IT:28blddao6a@62.112.9.140:13124'
|
||||||
}
|
}
|
||||||
FR_PROXY_MOBILE = {
|
FR_PROXY_MOBILE = {
|
||||||
'http': 'http://10488001-mobile-country-FR:29ph2jq1st@109.236.93.143:14212',
|
'http': 'http://7039778-mobile-country-FR:2ji8e3r0nh@89.39.106.148:14806',
|
||||||
'https': 'http://10488001-mobile-country-FR:29ph2jq1st@109.236.93.143:14212',
|
'https': 'http://7039778-mobile-country-FR:2ji8e3r0nh@89.39.106.148:14806',
|
||||||
|
}
|
||||||
|
FR_PROXY_MOBILE_2 = {
|
||||||
|
'http': 'http://d707052c-197322:21h64jwobv@190.2.149.148:18220',
|
||||||
|
'https': 'http://d707052c-197322:21h64jwobv@190.2.149.148:18220',
|
||||||
}
|
}
|
||||||
|
|
||||||
FR_PROXY_RES = {
|
FR_PROXY_RES = {
|
||||||
|
'http': 'http://7090876-res-country-FR:1tvt4pavvi@185.2.81.74:13378',
|
||||||
|
'https': 'http://7090876-res-country-FR:1tvt4pavvi@185.2.81.74:13378'
|
||||||
|
}
|
||||||
|
|
||||||
|
FR_PROXY_RES_2 = {
|
||||||
'http': 'http://10488120-res-country-FR:k94fsbn9a@217.23.6.161:11287',
|
'http': 'http://10488120-res-country-FR:k94fsbn9a@217.23.6.161:11287',
|
||||||
'https': 'http://10488120-res-country-FR:k94fsbn9a@217.23.6.161:11287'
|
'https': 'http://10488120-res-country-FR:k94fsbn9a@217.23.6.161:11287'
|
||||||
}
|
}
|
||||||
|
|
||||||
DE_PROXY_MOBILE = {
|
DE_PROXY_MOBILE = {
|
||||||
'http': 'http://8153587-mobile-country-DE:jp50x9jmo@194.88.106.169:11842',
|
'http': 'http://8153587-mobile-country-DE:jp50x9jmo@194.88.106.169:11842',
|
||||||
'https': 'http://8153587-mobile-country-DE:jp50x9jmo@194.88.106.169:11842'
|
'https': 'http://8153587-mobile-country-DE:jp50x9jmo@194.88.106.169:11842'
|
||||||
@@ -31,5 +41,6 @@ DE_PROXY_RES = {
|
|||||||
# FR_PROXY_MOBILE
|
# FR_PROXY_MOBILE
|
||||||
# FR_PROXY_RES
|
# FR_PROXY_RES
|
||||||
# PROXY_LIST = [FR_PROXY_MOBILE, FR_PROXY_RES, DE_PROXY_RES, 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]
|
||||||
PROXY_LIST_FR = [FR_PROXY_MOBILE, FR_PROXY_RES]
|
PROXY_LIST_FR = [FR_PROXY_MOBILE, FR_PROXY_MOBILE_2, FR_PROXY_RES_2]
|
||||||
|
# PROXY_LIST = [FR_PROXY_MOBILE, FR_PROXY_RES]
|
||||||
PROXY_LIST_DE = [DE_PROXY_RES, DE_PROXY_MOBILE]
|
PROXY_LIST_DE = [DE_PROXY_RES, DE_PROXY_MOBILE]
|
||||||
|
|||||||
Reference in New Issue
Block a user