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 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36', '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': 'A1Hl1weLAQAAQJjBcNyaQasQ-JTNmSh2uqvu1N3h-en2d9W5PXwl2Y-J1_KfAZoQG0AAAAAAAAAAAAAAAAAAAA==', 'x-1itxwo9i-b': '-l4ldc3', 'x-1itxwo9i-c': 'AEDB0weLAQAA0qhj9-U2KMCluk1qV46WIYnuPDTO6I7zolTmCx_ce5oYYfdJ', 'x-1itxwo9i-d': 'ABaAhIDBCKGFgQGAAYIQgISigaIAwBGAzvpCzi_33wcf3HuaGGH3SQAAAAByzJzLAKqe4zUjU1yTuFInxXPfR4I', 'x-1itxwo9i-z': 'q', 'x-1itxwo9i-a': 'GjpIpoXSxsREtYNV0W7ZnxXz__YX_PX9J0yQwoe1EdsSYsjBrjUgOeva67u-GLQ-rPxSBVATzS2oryKDs0aE-zZauMtozy9FvEpUv5zZowtdRdLOW9awyoOiW4VKsMu365godavSPMIJfhjcbakLf1r1Nw_C9spRjwjULSXxf3o6_a_nEcfamfhm_P7_bhrR-4bTqulPVZhPDcJRCiRc3kzrGW3Yhj5CHkAKPImnliuvEjXzI1ULTZkTXV1WHX7H6CM7JgF8k_TKcx1JmGYzMEi6vvqIAtx177DORX15bqlRugifCfuyHMu010J4gkwpzz_YeKlOgNEKR2e6j4C5jWxtmG4TFVhh28hJH9fUdwPg91lSqAfD-yStClq3rKLmMMbAr-VNm7D57CSTYSANFSo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Sy0UkYgECMQ-VhDzg7tp7tFedDn3GK9MeXjPpcBFwc9ggV'}




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)