#

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:8890',
    'https': 'http://127.0.0.1:8890',
}
# session.proxies = {
#     'http': 'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:9000',
#     'https': 'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:9000',
# }
headers, cookies = ({'authority': 'makeabooking.flyscoot.com',
                     'accept': 'application/json',
                     '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': 'CyfVBfDrRQ21SY81d2J1StOQaWUAAAAAQUIPAAAAAAAbC5x4kBPCa2NdbJTCzOio',
                     'incap_ses_139_2444946': 's/AyGzQ7flgalk+C9NPtAdOQaWUAAAAANyx4t1seDY/MEnY2EwW4ow==',
                     'nlbi_2444946_2147483392': 'N17Jax4Oj0J8vKGWbmwDOgAAAACKsm19xSsL92TR9w+jPKZB',
                     'nlbi_2444946': 'JSRmLaHpsVJmfFSVbmwDOgAAAADpqnaMdcb8EMaq6h+vqQ7+',
                     'reese84': '3:qII6mC4kXNDAT+D2e54I0w==:Kx7yhw0Zci72E9vm19caiE0i6UALCwYMa8VXPWhg5m4RZ5qgHAn73is5snQ8sqKidmPKyvxQRvimHs3oHXyGoPh6/tkrpDuggUH9Hq2mPq76riWx4ToSpzI27bAymVyMxIFG6p7VrxiN+HmeKx3AF+Ip0p4QPguL4DHImbkeDQ5Jm7ufu6qO3tV/4AkAFztAFeOnBgRuF9vRVSoWdIBc/8NA1GZ4hILHRVHj8FE+rymHm8CcWd6vfIg4NsgHjg3kn/lQ18msD2YrGHOppQ1yKyRWRaM37fkhCTnrSqmjnO6J7WbLcCRxrrwI+ztvdUvxhMqyR9rMbUQhwpDnC7FQ8s8JPjdgCvUOEbiZf5HczxZrONZtilyPGSPLTmj7+c3Ge6PM7kG4pqLOQNFBjMkWli92k65XDpJuCEYzKheBq/Z4Wj9EWmi67k9pdGb8cdmOZ1hkl+F8NGuZJ+HCtZTUaQ==:MgKHEGA5CrYhzCuhXaVy7z0B4U2rm3SEEcK159Yf00U=',
                     'ASP.NET_SessionId': '2pmeopkzmo0st3qvzv4sigs5',
                     '__RequestVerificationToken': 'P4PjPlNneELZMjf4aBEOa602yfMBlxXoaFzqTISb_WQckzgdqJRPKfNTp_miCBlLYUcFIPaDkvLMRATky0FLkNKZYHmnS-NZueYTiZajRpobQvs9TKGqYj11hbLAJznpqSq0NxyyJ3kjt25DHXUf5A2',
                     'CgjB85IKSlohV95kjCRFHNaZc1poefkptp0nLAZXbLIMmRhhMw7zoO51LhB9o': '638370139752964492',
                     'dotrez': '!DtwC0sOwuWxOrnf4YfoIV0iGlt0zFvKuZFAx0f8ulSkqG15/uTeUdjO94iO4JjNc2bOg8qmQSz+QFx4='})

url = "https://makeabooking.flyscoot.com/Book/Flight?culture=en-SG&type=oneway&dst1=SIN&ast1=ADL&dst2=ADL&ast2=SIN&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(url, headers=headers, cookies=cookies)
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)
