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 = {
    "_gcl_au": "1.1.414833160.1698747403",
    "pxcts": "970e4f63-77d6-11ee-a9eb-78e6fe245189",
    "_pxvid": "970e4172-77d6-11ee-a9eb-d94cbf89ca92",
    "_gid": "GA1.2.680187526.1698747449",
    "_ga_XXXX": "GS1.1.1698747449.1.0.1698747449.0.0.0",
    "_ga": "GA1.1.1167861038.1698747449",
    "wisepops": "%7B%22csd%22%3A1%2C%22popups%22%3A%7B%7D%2C%22sub%22%3A0%2C%22ucrn%22%3A99%2C%22cid%22%3A%2278471%22%2C%22v%22%3A4%2C%22bandit%22%3A%7B%22recos%22%3A%7B%7D%7D%7D",
    "wisepops_visits": "%5B%222023-10-31T10%3A16%3A43.178Z%22%5D",
    "wisepops_session": "%7B%22arrivalOnSite%22%3A%222023-10-31T10%3A16%3A43.178Z%22%2C%22mtime%22%3A1698747449168%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",
    "_uetsid": "b239cc6077d611eeaab83f2f47c2a229",
    "_uetvid": "b23a019077d611ee95d4a1ffbf4c148d",
    "_pin_unauth": "dWlkPVlUUmhaRE0yT1dRdFpXRXpZUzAwTkRGakxXRmtNbUl0TW1FeVkyTTNPVFV4TkRJdw",
    "_up": "1.2.1716056127.1698747450",
    "_fbp": "fb.1.1698747450567.801236987",
    "_tt_enable_cookie": "1",
    "_ttp": "gqklM1LVE3nGzGdLVvg2tobFsVx",
    "_ga_P2WLKWBNNW": "GS1.1.1698747449.1.0.1698748313.60.0.0",
    "_gat_UA-2678252-1": "1",
    "_px2": "eyJ1IjoiMWM2ZmNkZTAtNzdkNi0xMWVlLTkwZmMtOTkxZjk2YTFiMjcyIiwidiI6Ijk3MGU0MTcyLTc3ZDYtMTFlZS1hOWViLWQ5NGNiZjg5Y2E5MiIsInQiOjE2OTg3NDg2MTQxNDUsImgiOiJmNzRlZWYwNmI3NTU0OTMwYzdlYzQxZmU0Y2VmYjZhNDgzMDZhMWY4NzZhMWQ4NDI5YzgwZDg0ZTEzYzFiZWVhIn0="
}

# cookies.update(
# {'_pxhd': '96f0793333025988fe38bb055475264dd82252fff204e97b7ac2aaa8cef23698:56b34b9c-77c7-11ee-992d-daaf5fea4f5e', '_pxvid': '56b34b9c-77c7-11ee-992d-daaf5fea4f5e', '_px2': 'eyJ1IjoiYmJlNjBjZTktNzA0MC0xMDMxLTk5ZjEtOThhMDY3YmM2OGUxIiwidiI6IjU2YjM0YjljLTc3YzctMTFlZS05OTJkLWRhYWY1ZmVhNGY1ZSIsInQiOjE2OTg3NDExNTU2ODUsImgiOiI4ZDkxZjdlYjQ2NDhlZjg4MDlkOTg1Y2RkMjEzZTMwYzJmYjA1MTE1ODg3YTRmZTVkZDQ5ODY3OTY1NjJhOTlmIn0=', 'pxcts': '576c03b4-77c7-11ee-91bd-ac4e67be51db'}
#
# )

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)
