update proxy credentials
This commit is contained in:
+13
-6
@@ -13,10 +13,10 @@ from pojo.ReserveResultPojo import ReserveResultPojo, PublishType
|
||||
from pojo.contact_pojo import ContactPojo
|
||||
from utils.excel_reader import ExcelHelper
|
||||
|
||||
RDV_URL = "https://rendezvousparis.hermes.com/client/register"
|
||||
|
||||
# RDV_URL = "https://rendezvousparis.hermes.com/client/register"
|
||||
#
|
||||
# RDV_URL = "file:///Users/lpan/Downloads/test_appointment.html"
|
||||
|
||||
RDV_URL = "https://api.ipify.org"
|
||||
otp_value = None
|
||||
user_agent_list = ExcelHelper().read_user_agent_list()
|
||||
OTP_FIELD_ID = "#sms_code"
|
||||
@@ -45,7 +45,7 @@ class CommandorPage:
|
||||
first_page = None
|
||||
while first_page is None:
|
||||
first_page = self.start_brower(proxy, pwright, user_agent)
|
||||
proxy_username = "panleicim-cc-fr-sid-" + get_random_id_number_for_proxy()
|
||||
proxy_username = "panleicim-stc-fr-" + get_random_id_number_for_proxy()
|
||||
self.logger.info("proxy_username is " + proxy_username)
|
||||
proxy = {
|
||||
"server": params.PROXY_SERVER,
|
||||
@@ -187,7 +187,7 @@ def on_success(result: ReserveResultPojo):
|
||||
|
||||
|
||||
def launch_page(ready_for_otp) -> threading.Event:
|
||||
PROXY_USERNAME = "panleicim-cc-fr-sid-" + get_random_id_number_for_proxy()
|
||||
PROXY_USERNAME = "panleicim-stc-fr-" + get_random_id_number_for_proxy()
|
||||
print("proxy_username is " + PROXY_USERNAME)
|
||||
proxy = {
|
||||
"server": PROXY_SERVER,
|
||||
@@ -211,4 +211,11 @@ def wait_for_otp(event: threading.Event, commandor: CommandorPage):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
event = launch_page(wait_for_otp)
|
||||
# event = launch_page(wait_for_otp)
|
||||
import urllib.request
|
||||
|
||||
proxy = urllib.request.ProxyHandler({'https': 'http://panleicim-stc-fr-121:94sY7zwBG13i@gw.ntnt.io:5959'})
|
||||
opener = urllib.request.build_opener(proxy)
|
||||
urllib.request.install_opener(opener)
|
||||
content = urllib.request.urlopen('https://api.ipify.org').read()
|
||||
print(content)
|
||||
|
||||
Reference in New Issue
Block a user