import time

import requests
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 = {
        "Host" : "jbrest.jetblue.com",
        "x-1itxwo9i-b" : "-xgnu3s",
        "booking-application-type" : "NGB",
        "origin" : "https://www.jetblue.com",
        "x-1itxwo9i-f" : "AxweutqKAQAABwuLgpfY0rVwGe8HffN9GoGv7oTcebwhUauqimaJxO2G9Xf2AdF__ScAAAAAAAAAAAAAAAAAAA==",
        "x-1itxwo9i-d" : "ABaAhIDBCKGFgQGAAYIQgISigaIAwBGAzvpCzi_33wdPhVLoqVarPQAAAAByzJzLANulyT4npsPi6qWV97r5nd0",
        "x-1itxwo9i-a" : "14qokXbjZCBZoFpJzv8x=1DQwmKxP2MsBaAAUouVuS9IKPSSSuyjTUkfDFfXPBsoSIMIGrwzi1h_GVluiwhFRgrjXKqC9A9L9PO60tgKNZ_CEC8HKL8TLr=a_DrGXqo6saOqVkNC__IYOCaDZ0_Zvw--QrWUHllvXWnqZKRMl848u=2XW5k2-qrQmWhOpnLkwEoTrzlgd9KQATiG7BLj_1wnTEYsDDYYYWkWzbT98A8HR_K93g_zfgZkKkqaNvr886ELEBn71pasd_2J5nAsn5nUTEb-Ix4YZNOLdMMSw8HQzjbSBAj-eGu_mmp9EpUNbWF0lmxaCMWaGUEyWMOd23vv6dheA8l3SzYXwaTDMtmIK5w6SYBg7qeJ1CUqM3xD0n6qSdxnBPx=ro1wFO9h5_z66TCFErFsPIstzUvtzXZ6Vha=l-wWSJIMA6_w_yyAR9DHoYFJEyE7mJh7TR9ETz=bj=m4-awGtF11WalUYfiQyexApBz4NJLmKd04Yy2pL2ICoDN0HCOpdv2f6tZOPVDxxmxzuF4RvFbqRfNHsVVOCq141U9MPAO2o3dsgpFm7yV7I9AJuv0EPu3X1g_VUn_7TGZD==EA8Be1eLQF7a-g2Kxx9wwAFs86a5TO=3z9BvtKeMgAbaMOtxA_B28EKARJN8A2ey5872uOZ-O2MFm88tkz0jxVgFiLOySxnwL3ZXksu8Lko0L5NTNM_yJmsnjdV1bVhsbaluRfAI1SxOu0O5mGAK6JYfQ=4Y29P-NS-2nO_V3IaHbwGW_tJgT8UnGTBELxpQn_i86NaBOmXgVkB_8dQxrt8YUgvd7Vyr5ACKErTulx1iGbWOghDUYU9PH6rs7MACDXgQrKgNuxMba4nJZna_CrY13huwq9kFMoi4XzTLAbZGCl7hahw4OxBL2m4g_pYE8agZOwxBnm5fmZJ7ztv1H5RwsmlGYCAgCAxybusoRT--nEZbrYf8aYFCoJfmmqb=eEUjhYvzbmd-M5qFuQp8DeEaaqV0pnnRb7sygiVa08t2i-g6E=zsWE2q2UJ0FbtdNWRrGMgoHV9_j44hOlT4CbO91DMsCQJWRpNgifAuGY9DT9iz3QqzTsFFvSJ0_TuNWO=ljffy74MJxd0onqC6rl9z9hwQdajHOluShSmroWsyRF2F3JXDsWSPgbFvQHTeIx6wqhiY0anPXhtYk08JoeiJkQl-L7UE4T35abIhNKxb1PjCx22FfxmJXf-x0TH3j6ox_IBV-UgInl0-zhwp5oYfiXnqlylkrSlmXLFwUDAwmVEiA4ofVYv7JwpzlfBvyW4rIXuKnVg0gOrVVFIJXEmo=FqGvdQNQD9XgP-46RxKb5suPZCukuboxaljn2JzHFiW9ERCk7dyCpVuajFk=B9HdDN00Mb84usf2JthE3h0TEBDtCDr0nZHiiSDLwz1uD3j8H=O_ST6WFKn-n_uLA-WeiL5mGt=-LgV3K8l1jAXQ3bkM4JHhAyfZ5YLVnOzoBwdwKHgApErvUAhjYz5O8Dre7XEvoQk2paQYR6SV65IRCWgxpH5jOnmKQ86HAbR3BMT8nslJr9xRDtEUo3Cy=h3-HpH2Kb0ekCmPex6dR4i4BNjwJLMI1Sh8x7f=P5DGbABao41Z0XJzUoUoDGjmnIYxLh0v",
        "accept-language" : "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7",
        "application-channel" : "Desktop_Web",
        "user-agent" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36",
        "content-type" : "application/json",
        "accept" : "application/json",
        "x-1itxwo9i-c" : "AKBgttqKAQAAMSs8TJL_rVcXeWsiaZkrwSbycXcYaIGRgWc9p0-FUuipVqs9",
        "x-1itxwo9i-z" : "q"
    }

url = "https://jbrest.jetblue.com/lfs-rwb/outboundLFS"
data = {
    "tripType": "oneWay",
    "from": "LAS",
    "to": "BOS",
    "depart": "2023-05-10",
    "cabin": "economy",
    "refundable": False,
    "dates": {
        "before": "3",
        "after": "3"
    },
    "pax": {
        "ADT": 1,
        "CHD": 0,
        "INF": 0,
        "UNN": 0
    },
    "redempoint": False,
    "pointsBreakup": {
        "option": "",
        "value": 0
    },
    "isMultiCity": False,
    "isDomestic": False
}

while True:
    print(session.post(url,json=data, headers=headers).text)
    time.sleep(1)