#

import tls_client

session = tls_client.Session(client_identifier='chrome_117')
px = 'http://127.0.0.1:7890'
session.proxies = {
    'http': px,
    'https': px,
}
session.proxies = {
    'http': "http://user-uni007-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600",
    'https': "http://user-uni007-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600",
}
session.proxies = {
    'http': 'http://127.0.0.1:7890',
    'https': 'http://127.0.0.1:7890',
}
headers, cookies = ({'authority': 'makeabooking.flyscoot.com', 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7', 'accept-language': 'en-US,en;q=0.9', 'cache-control': 'no-cache', 'pragma': 'no-cache', 'sec-ch-ua': '"Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"macOS"', 'sec-fetch-dest': 'document', 'sec-fetch-mode': 'navigate', 'sec-fetch-site': 'none', 'sec-fetch-user': '?1', 'upgrade-insecure-requests': '1', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36'}, {'visid_incap_2444946': 'mFS2MQ8/SY6/uE1/6KFRfMB0aWUAAAAAQUIPAAAAAAAdrXI9MckKagYshzARDRGc', 'nlbi_2444946_2147483392': '5fNeD8bIREC/4vmFbmwDOgAAAADEEyIfILRfgp9OPWBMj8Pj', 'incap_ses_1463_2444946': '9LqQKCf17QcpEzlLdZ9NFMB0aWUAAAAAPQp76MnU+REzrF1D3r9dCA==', 'nlbi_2444946': '3SA7Aqortz+6XOIfbmwDOgAAAABI16aS8tf8BXSaRanWc0Jy', 'reese84': '3:0IMbA6IeBzNcWtJwtJdRFQ==:oOQkSM3+udYczYUBG+6VSIDnCisXI3QxcHwR6dRhBT9awdS7CSw8lhH3l0C84btxI8CsJf/BfPASul1kPvAm1PnSPw/svqYCxtjfVZmeBAhHLNp1uh7X3sunklJDnXNxcDApCqpxgut7ard+pFYHFME5mSECNEj8P9izcygnBtYCLCZ/alZZaPTUvFXRVXLpHdOWYbiJIKG3nyH5QGr8iNPlnDQ2J9SY+WOVVJeGdcOUH4tlzWaksFaGMTxAOBigwVJBWUcmhKLb5Mo36sooubiS8SYJ1HK9orNpf1HV+6LBuonYz6AhzEcOrV7wvjTTCLyuotx8ZFskvBHEZ2C9kFNcMfLuWDoZQGEwl6gnQqk33kzTWigFAAQ0oxCFbOcJmTPHzTBGSGFIZW+VHpZON6q89OLSLBBGCLFwAZfmsd74c6YdeK2ZiYPoblsmMNF6u1J89ZivknmBvx0tmm48ug==:ZAV4dSk55yINNwNfHx6Q/KUNJsKzbI0QZJvC9UBsZu8=', 'ASP.NET_SessionId': 'fepdmdrsdrdmsbtu1tcmrmzx', '__RequestVerificationToken': 'RMTvsVVLOuYAqIvAXvrMY6VBcnh48RKPVvDi6XLP8WCvFQth-NH5on3LTL1WG55weAy8NJiJY46mk4NEVZBUD4L9HuT6LhCYUbo0kbhTwXVgLbHODJvkRPrjzlDy7KGgCUqDL0wLQe5TkkBxL1AmXA2', 'VbgyMUNdAjl32toUUPmKuKFUiXdrn8nZjO54pFQq2GS3nblvjDExFkwhbvJcrwK': '638370067910106866', 'dotrez': '!cP6EvRcOYvhLlUmcSTMDvJJyoMoTwQl1yYDR1wEDmUNzWFq+lYq2bvq/uVPj+3iBuKRzBXfMK8Es/Ws='})


url = "https://makeabooking.flyscoot.com/Book/Flight?culture=en-SG&type=oneway&dst1=HKT&ast1=TAO&dd=2023-12-15&rd=null&adt=1&chd=0&inf=0#"
main_url = "https://makeabooking.flyscoot.com/Book/Flight?"
main_dict = {
    "culture": "en-SG", "type": "oneway", "dst1": "HKT", "ast1": "ADL",
    "dst2": "ADL", "ast2": "HKT", "dd": '2023-12-15', "rd": "null",
    "adt": 1, "chd": 0, "inf": 0
}

# url = "https://makeabooking.flyscoot.com/Book/Flight?culture=en-SG&type=oneway&dst1=SIN&ast1=ADL&dst2=ADL&ast2=SIN&dd=2023-12-18&rd=null&adt=1&chd=0&inf=0"
response = session.get(main_url, headers=headers, cookies=cookies, params=main_dict
                       )
print(response.url)
print(response.text)
print(response)

# import requests
#
# request_data = {
#     "service_name": "lcc-tls-forward",
#     "source_url": "http://39.106.6.97:88/svn/develop/lcc-catcher/lcc-tls-forward-1.0.1.jar",
#     "cur_version": "1.0.1",
#     "upgrade": "ON",
#     "force_upgrade": "OFF",
#     "upgrade_method": "serial",
#     "environment": ["prod"]
# }
# request_url = "http://47.102.111.131:8083/api/v1/service/upgrade"
#
# res = requests.post(url=request_url, json=request_data)
# print(res.text)
