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 = {
        "x-1itxwo9i-c": "AOCj8s-KAQAAFv3WrUF6_sykYEIz3L7iYcwoB-4x7kcOKX1YQpR1wvXIHSSP",
        "x-1itxwo9i-d": "ABaAhIDBCKGFgQGAAYIQgISigaIAwBGAzvpCzi_33weUdcL1yB0kjwAAAAByzJzLAEgrj0ZIyjXFqhDcA-_qV7M",
        "x-1itxwo9i-f": "A8v49c-KAQAA6_U_vTh7LverkMRUMybhjQrwSS7_brJhnFnJ8sKZK7Ys7FEXAV-knh8AAAAAAAAAAAAAAAAAAA==",
        "Host": "jbrest.jetblue.com",
        "application-channel": "Desktop_Web",
        "booking-application-type": "NGB",
        "accept": "application/json",
        "x-1itxwo9i-b": "shjvm2",
        "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
        "content-type": "application/json",
        "origin": "https://www.jetblue.com",
        "accept-language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7",
        "x-1itxwo9i-z": "q",
        "x-1itxwo9i-a": "sj42bxy9HVrw1ML=M_Z-x4nRij2-CECPDyN-e77ichJb0HaygIlNLCWw1wfVC-362b7YpKHYER7PrKwnJVxZ6kFcIf7ez7I-dk_9RnWU7Ue8GRiXfg8YaIwgEpNrlEJSY_I79svUnSSa-G8WiCKrX99znpCYz88ZtFFx3wdLsvP3CbEV9OyhF6460_vZSlLYMb3Oti5d_fcemtCxsyDDWlWfpFxFctKqORElcDMbB7t52DSPwwcFwZ6kDzD45jA6kC2icDxxgSyeAnI7MlVFK6VNMb2sg9CdT80H5uqEBPnyvc0AUrTr7C4pB2See=3wrhWo8NgL75X0xgWPJHY7ecYG6HdnsEdbe=dlp=xZ_rk42R0uxI99=9JLp_mkfzTI=WhH2R5h9BivxTTZn-ZA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7cu8D=dipvSOuVj8PxwPnLU55-31ATv2EfMh=7savbmvZygTksC_IbBfLDW-Tfco15GVYMfXRWsKG-HeIHphUt2ZJ0hg8kS_T_xfdEX7VWXZ4gBPtEAhx72tk6vlXJp0lBGWnnPqZz7en08RG8WP4Ty89jGC_zq5HRrkvhr1LfRqSKA_KPt2YvL"
    }

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)