#

import tls_client

session = tls_client.Session(client_identifier='chrome_117',
                             header_order=['Host', 'content-type', 'accept', 'accept-language', 'authority',
                                           'cache-control', 'pragma', 'sec-ch-ua', 'sec-ch-ua-mobile',
                                           'sec-ch-ua-platform', 'sec-fetch-dest', 'sec-fetch-mode', 'sec-fetch-site',
                                           'sec-fetch-user', 'upgrade-insecure-requests', 'user-agent']
                             )
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 = \
# ({'Host': 'makeabooking.flyscoot.com', 'accept-language': 'en-US,en;q=0.9', 'authority': 'makeabooking.flyscoot.com', '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': 'BSqf8bocQXiPwEIFZdVWGaqkaWUAAAAAQUIPAAAAAAB2vvhNfmyPKy49qEYMa0Ri', 'nlbi_2444946_2147483392': 'TZwkZ1OdhmMnYHXMbmwDOgAAAABr9MCw98DVUmufxdAUnqcj', 'incap_ses_1046_2444946': 'FW2yIPtA3Dej7MBxfCSEDqqkaWUAAAAAtqo1AK7pCn9HhYbF8GtyMw==', 'nlbi_2444946': 'ai4VMZcijlfrD8+WbmwDOgAAAACyedacSTPF7RVxxMsvJ6AF', 'reese84': '3:Kkaf2dq6kZYrDGbhRotjrw==:cBlSSPrKIhbD0QxS/F6Hn8LdDLfbkQ2bEoSGpbroXBbpaImFKoVvWyEVi3wkDcVe/hp+MXBsr3SY9lACpcrg0a5YoYVgOVG55Bc2eKpnAlub4i6mMgrv0zkh5KWG9VFbEKPB42/erjaOmYIwuYb7J6WUBf0A96MQ6I3qsvvYcii/+1Ex2Pim9PA9g6Oj8O9CYUzAQnSCud5HmaGo2zXkZK/gBc2a+2XkRpMYO1zL1DJ5wm5nqjQL0YGbXpcKrXUbwvRGZ/6Wm+l9k5G2UUlU4cuhoeUpIoUZzccA9Q+0MDYcaiR0HuL0R1s4TvEby0AhkkazkzQLFiCz5cRLhhG0YCiO1knXyiGloIQm3C+sb/GCZeXfWXVSX8FDFS5XTwBic/2sqNwaIWiTA3+IRnIguFiS0UhqmiegyOJy0lY9971Kbt2ob4fq4cEbnkp2s1fKOXW1J+5qacpjYv//RNux3w==:7bsmhFEO5taZ/G0/vV7QyGD4Nw7o1adzpVrwxbh0vWI=', 'ASP.NET_SessionId': '4yosbuu2dhvagimx024cwfcw', '__RequestVerificationToken': 'oPWeafRQpbIAuat_6yaOYBrXTTtLmsLHmH7YE44Rf4A8Aah-ZPrPiPYDOjz7rE5dtI58-kN-Ug58MtIv7CakYEqLWnwUC0T2l2oDM2l0l0RyNwPhI1VHOjfbI7M_D5zow55yz-LJpylaAnj4qqjsrA2', 'SyKF4Lu6WkahTEFlA7FDKERTXLh48jE9bvb9aHeCggEiSi4kNMQ6AVTRguR3wzk': '638370190627342223', 'dotrez': '!99bP1pXleYxtvy6cSTMDvJJyoMoTwcfWxfyQcU6gBiRrWAKnOC6eIVgCDv0q6eRN/fyG4cnNxowET3Y='})
headers = {"sec-ch-ua-mobile": "?0", "sec-fetch-site": "none", "upgrade-insecure-requests": "1",
           "Host": "makeabooking.flyscoot.com", "accept-language": "en-US,en;q=0.9", "sec-fetch-user": "?1",
           "sec-ch-ua": "\"Google Chrome\";v=\"117\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"117\"",
           "sec-ch-ua-platform": "\"macOS\"", "sec-fetch-dest": "document", "authority": "makeabooking.flyscoot.com",
           "cache-control": "no-cache",
           "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",
           "cookie": "visid_incap_2444946=kM7jmWvDQXq4a6S7pvX+re2kaWUAAAAAQUIPAAAAAADNUdkeK6R1HSHVL3VC2aXN; nlbi_2444946_2147483392=3yX2O9PD1xDIChsnbmwDOgAAAADHvboadoOon4z6QR9tXquh; incap_ses_7225_2444946=LNpzS83xmVW4ZiiQKlxEZO6kaWUAAAAAvNFrM6Cn0dssoA2EdP1sgQ==; reese84=3:vJo/m6yUrbv0GXE9jiWGAw==:RzFAp65bfU/G/UX9FTYGIQPg+zgLXryBtQU6k4S/O3zUZhqdDAbI0Lj7vl6xiIKGIMPPyNaFNiIEJo18hFV4OKxnAu3enD3YXSKwyvZRQNx39y6Fl5ILxQHP1Gd9rE8CyVc9s831tvHEJyNrOt4+Vz1aXNeU86CyWp3xMQKs8t3RA48Ol9Wu+/pHW1pv5JEnwdR/6K9yLwRTbYW33U/ZOuV3blPdv+RgDIsJv0X580VMsMrQfbVCxYKkA7G1FgCbGXIHeaWWqPY1l+53wkqyX9DLOgNFC32DQQQZCRnda97KEClQgCKxdDVATxB/x3syeW8AvyByIEqp4Xt499DHkLnMy5vXq3z9PfG8IxKvPC9GQylodMovwXu4y6Gv4vvmpEPE28kcqkqhXFu0dq51Li3dtDZEt5i7jn8KdRzAw/qsUfnuo29MiqItoWMtAsCM8D1/2s4//6jOjE4aWgOknw==:bBea5wc+1uVzyab1t/VbY1qnXXN9i/2nUzxDXE2wqFw=",
           "pragma": "no-cache", "sec-fetch-mode": "navigate"}

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#"
url = "https://makeabooking.flyscoot.com/Book/Flight"
params = {
    "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"
}
response = session.get(url, headers=headers, params=params)
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)
