import tls_client

session = tls_client.Session(client_identifier='chrome_112')
session.proxies = {
    'http': 'http://127.0.0.1:7890',
    'https': 'http://127.0.0.1:7890',
}

headers = {
    "authority": "booking.flyfrontier.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,zh-CN;q=0.8,zh;q=0.7,ru;q=0.6",
    "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": "same-origin",
    "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"
}

# headers['cookie'] = '_gcl_au=1.1.963045782.1698659101; _gid=GA1.2.297884565.1698659101; wisepops=%7B%22csd%22%3A1%2C%22popups%22%3A%7B%7D%2C%22sub%22%3A0%2C%22ucrn%22%3A47%2C%22cid%22%3A%2278471%22%2C%22v%22%3A4%2C%22bandit%22%3A%7B%22recos%22%3A%7B%7D%7D%7D; _fbp=fb.1.1698659101107.1293308129; pxcts=fed889bc-7708-11ee-ac10-e036b01709e2; _pxvid=fed8767f-7708-11ee-ac10-daadcbe32b84; _pin_unauth=dWlkPU5EUmlZak5qWmprdFpEUmhNeTAwTURNMUxUazBZamd0WWpSaVpETXhZV1V5WW1Saw; ORA_FPC=id=206781d1-8791-4bcd-9d13-b25999e30ff7; WTPERSIST=; _up=1.2.738217452.1698659104; wisepops_visits=%5B%222023-10-30T09%3A45%3A15.407Z%22%2C%222023-10-30T09%3A45%3A00.986Z%22%5D; wisepops_session=%7B%22arrivalOnSite%22%3A%222023-10-30T09%3A45%3A15.407Z%22%2C%22mtime%22%3A1698659118611%2C%22pageviews%22%3A1%2C%22popups%22%3A%7B%7D%2C%22bars%22%3A%7B%7D%2C%22sticky%22%3A%7B%7D%2C%22countdowns%22%3A%7B%7D%2C%22src%22%3Anull%2C%22utm%22%3A%7B%7D%2C%22testIp%22%3Anull%7D; _ga_XXXX=GS1.1.1698659101.1.1.1698659118.0.0.0; _ga=GA1.1.389354129.1698659101; _uetsid=fea8def0770811ee91a20bd33fe9c12d; _uetvid=fea8d5c0770811eeaa5ba75fb8581e79; _px2=eyJ1IjoiMDczYjQ1ODAtNzcwOS0xMWVlLTk3ZTctNDk3ZTRiYTM5OWMxIiwidiI6ImZlZDg3NjdmLTc3MDgtMTFlZS1hYzEwLWRhYWRjYmUzMmI4NCIsInQiOjYyMDIzMzg4MDAwNywiaCI6ImMzYjczNDNhMWVmNGZjZmE0M2MwOTI5NTliN2Q0ZTcwMjIxYTE4NmNmY2NlY2ViZDdlYWEwM2ZhZDk1NWNiN2YifQ==; _ga_P2WLKWBNNW=GS1.1.1698659101.1.1.1698659146.15.0.0'

cookies = {
    "_pxhd": "22d212df719dee891560a19dd1fcf693763a5313e14dceaceeffeadd74c1ed9a:a668952e-76f1-11ee-86c3-0367edfc9861",
    "ASP.NET_SessionId": "jeqduql3iyaomqpqad3blyfw",
    "__RequestVerificationToken": "SiL39TrXCORrOWYMGAn1m9r_PJmUiaCgG2cBScexdb-e38HOXLlF5mufYteJfduU2GuMiP1lLsdu2s8E2DoMspPe5YlaeF2W0mUMzrXyxBslr1p1eWNnlR7IJSs9tJv1m-JWjQ2",
    "_pin_unauth": "dWlkPU5EUmlZak5qWmprdFpEUmhNeTAwTURNMUxUazBZamd0WWpSaVpETXhZV1V5WW1Saw",
    "_gcl_au": "1.1.963045782.1698659101",
    "_gid": "GA1.2.297884565.1698659101",
    "_gat_UA-2678252-1": "1",
    "wisepops": "%7B%22csd%22%3A1%2C%22popups%22%3A%7B%7D%2C%22sub%22%3A0%2C%22ucrn%22%3A47%2C%22cid%22%3A%2278471%22%2C%22v%22%3A4%2C%22bandit%22%3A%7B%22recos%22%3A%7B%7D%7D%7D",
    "_uetsid": "fea8def0770811ee91a20bd33fe9c12d",
    "_uetvid": "fea8d5c0770811eeaa5ba75fb8581e79",
    "_fbp": "fb.1.1698659101107.1293308129",
    "pxcts": "fed889bc-7708-11ee-ac10-e036b01709e2",
    "_pxvid": "fed8767f-7708-11ee-ac10-daadcbe32b84",
    "_px2": "eyJ1IjoiZmU4Y2ZiNDAtNzcwOC0xMWVlLTg5MzUtZWZlNDZiMGU4OTBjIiwidiI6ImZlZDg3NjdmLTc3MDgtMTFlZS1hYzEwLWRhYWRjYmUzMmI4NCIsInQiOjE2OTg2NTk0MDI0ODIsImgiOiI3ODdmOGYyZDZhNjYyY2IwZTQzMDM5YTE4ODY0Y2VjMDYxMTU4ODZhOWI2N2ZjZjg1NzdiNjUwMGFkYWQ1YTczIn0=",
    "ORA_FPC": "id=206781d1-8791-4bcd-9d13-b25999e30ff7",
    "WTPERSIST": "",
    "_up": "1.2.738217452.1698659104",
    "wisepops_visits": "%5B%222023-10-30T09%3A45%3A15.407Z%22%2C%222023-10-30T09%3A45%3A00.986Z%22%5D",
    "wisepops_session": "%7B%22arrivalOnSite%22%3A%222023-10-30T09%3A45%3A15.407Z%22%2C%22mtime%22%3A1698659118611%2C%22pageviews%22%3A1%2C%22popups%22%3A%7B%7D%2C%22bars%22%3A%7B%7D%2C%22sticky%22%3A%7B%7D%2C%22countdowns%22%3A%7B%7D%2C%22src%22%3Anull%2C%22utm%22%3A%7B%7D%2C%22testIp%22%3Anull%7D",
    "_ga_XXXX": "GS1.1.1698659101.1.1.1698659118.0.0.0",
    "_ga": "GA1.1.389354129.1698659101",
    "_ga_P2WLKWBNNW": "GS1.1.1698659101.1.1.1698659118.43.0.0"
}

# cookies.update(
#
#     {'_pxhd': '29599d17a26fd935cd95526fa24063252758acffd2f7b02453e3652e9287b2a6:83f63b50-7709-11ee-9484-341acdebc08b',
#      'pxcts': '8755dd4a-7709-11ee-9693-a9aaf6d5449c', '_pxvid': '83f63b50-7709-11ee-9484-341acdebc08b',
#      '_px2': 'eyJ1IjoiYzA2NjMwYTktNzA0MC0xMDMxLTlmN2YtMWYyMmQyMWIzMTFhIiwidiI6IjgzZjYzYjUwLTc3MDktMTFlZS05NDg0LTM0MWFjZGViYzA4YiIsInQiOjE2OTg2NTk2MzA3OTMsImgiOiI1MGRjM2E3NGVkMjIxMWJkODEwYzVhN2JkMWU2MTg5Y2E0Yjk1MjM1MjNmY2RjM2U0N2MyNjkzMjUxNzU1N2NiIn0='}
#
# )

url = "https://booking.flyfrontier.com/Flight/InternalSelect"
params = {
    "s": "true",
    "o1": "DEN",
    "d1": "LAS",
    "dd1": "2023-12-01",
    "dd2": "0001-01-01",
    "mon": "true",
    "adt": "1"
}
response = session.get(url, headers=headers, cookies=cookies, params=params)

print(response.text)
print(response)
