import time

import requests
import tls_client

session = tls_client.Session(client_identifier='chrome_112')
# session = requests.session()
session.proxies = {
    'http': 'http://127.0.0.1:7890',
    'https': 'http://127.0.0.1:7890',
}
headers = {'Host': 'jbrest.jetblue.com', 'application-channel': 'Desktop_Web', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0', 'booking-application-type': 'NGB', 'content-type': 'application/json', 'accept': '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-f': 'A4MG7SaLAQAAXvifRbJvgs3krpQhxhcDGFaI0U0JTpR6hvlhoCrpjBbY3qH7ASa1TS4AAAAAAAAAAAAAAAAAAA==', 'x-1itxwo9i-b': '9mfu19', 'x-1itxwo9i-c': 'AOBD7CaLAQAAyyXt1r2YThobznBSyFWRV1SQlDYflaH_alR391MFA10hFyg7', 'x-1itxwo9i-d': 'ABaAhIDBCKGFgQGAAYIQgISigaIAwBGAzvpCzi_33wdTBQNdIRcoOwAAAAByzJzLAKSZkX0bxVY9zIB2kGXMEIA', 'x-1itxwo9i-z': 'q', 'x-1itxwo9i-a': 'iXAdHVwZGIP8H=F035tUAwzc4nPSWTNOAvk8bFjmTYPmRM2XURDK1U0C2JLK4qhM_HVM1oebSi5AQkpJcw_k4HB3fiHigYAKo_eQIkqpbx9L-zZdv2_Vdx2ITjhrIguVmSBfpC2LbKOrp_fqIA-lxjcsQNSqB-GwCRakJ9J0sY06BVbJL7ff8IjfB3ZecKgmVHFrfcz6UzI3sppLHjEPrqd8A8M1b7IGoxwHTazNG0_9v7JF2nvxDw8cA6h1Qn=tjYKF0heemU6OeBkQau7vYVIn0j8vqBgSPzLAUKefsYhmnHEIwjVi1L=LcDl_jXQuZ7GRNV2FeBZYj3otK_TbKfgS-sk7MSrToSD2r_16_weYRalFIZ3CwLMOFmMw3FJeT1AGlOFI9gXI7i4LIOt3Ta0LsRUFN=E6=GlK-eai8LTU9OKOvKS=K91g3VDpBpx83qG1i4n6IXYuH5HSk74XCfM=EzEdFGsSk5lxB62W6DKB=h_BkW9VsXBRdCmjkJbopMvOwZt-eRFk1DAPGV24DhwPpaOc8c1s4pUXB7HjU2uJE4Eu9PWnFfj_nHlZ5FkLzkIjeaF9_=M7fnCaNjad2PWqTAg4Q3Nj=Xf3izDkqK_M7jeBe-L-8L393VAfQuL2aGk7N6V_7KE0kCCH71JA101hw6-pagSwIG3UPGPb71tXz-OhjFaBc5pH46kEAdRnasGM0pVxOGd5YUKa8jN5-Y8lbpO-XHwvfv9p6NSh9Il4bnuTOvtz2fnNmIFuhiKQwZf6cu9QMAGX=MXQGYA58p47nka2gYC4ETO78oCAJF2f=JJJQTtqZ7BC4xNOiu5uiuEp8Ow4Sdb74hr3BtTRSI7WWvbNVQ1E2rSgnj6Ms0Huv8sQ7f5ssid8qN_qb_om_zOmB=EzQT0AP9W0MqtVQn8vwuo5LO9uakZ9uUq3C08KsPxEcOUHdjjlAl_85qjOr-b=dXS1mVNOI9_gJbZHE9ZV7ScF2pdE6817l2=QH3=UYVzLCB68H6KOWAns8M2cLrvDZV6LW4UNs9Q=f-=zxddL-m1XBfV-OlYJjBxtF3DB0dkQ0Anj82k8xUvp0-Yf2_NRIFZxhMbrxu63=IuDWveZPoPQhhQZweG5q5A6vgdv3982PYz0Owxo9NBiFGCT-7FWz4oTKF5QXNrACs-6TSS=HDxvGT7xNdlXbUPvHjUHFVmt43qcEvNagqFQ3N3wA1UbTkoFpsCcvswTSeFzbCUDR=zVzbmapO42pEzhFxIWznCRLG4DNszbItTl-X-lgf=5T3mRN9ZeleJMm6FeU0ZQpU9vIYmIvCHiiCH3XhlpX2o3Bo66PUIQM8m879Sf07Aicm-r'}




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)