import time

import requests
import tls_client

session = tls_client.Session(client_identifier='chrome_111')
# 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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 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': 'A6QViTaLAQAABLzeQIXarEwWOIU7mlevAT17hEc8A71wplqvc8bdSlVGsfQbAWe-slAAAAAAAAAAAAAAAAAAAA==', 'x-1itxwo9i-b': '-y9c2y4', 'x-1itxwo9i-c': 'AMCKiDaLAQAAG6AMJf7MXZP1bcjtX9xwnsgqyeHcfqmblKvYSPoLFamQByaw', 'x-1itxwo9i-d': 'ABaAhIDBCKGFgQGAAYIQgISigaIAwBGAzvpCzi_33wf6CxWpkAcmsAAAAAByzJzLALVMrSRHj9JZnC6AR_J032o', 'x-1itxwo9i-z': 'q', 'x-1itxwo9i-a': 'QU-6rllkWVldU0=n9yBaMv0-jAQZcyCjV1wGxGk92fvCfXkHIil1KxsgOcXkddbGSbTBhg4ftMtwfn-f4Qzv9elL2ktlVrsgVhKOpTj3FV6Q=xRRh1HZ0KrzBKBFMKJsZAIiClzVF_CoMMXJUnCNBNNG5Ii1b0MoewYWEYxZ8T-w_oUwpMWABplCP9fLB6OkRKAAEZ4LaiYThcyWVoMY-UmHiLvJJ1jfOKxa9elyVg3G964k04h-hJJkPVPGQb_iEGAhZI7335JNTGDCzsLeV5vlH0pRvew4LDP2XSHvEgki6wQ8TGKl_nSmTNYTXjZd9pn4BdQP1lg2lKsODTOJXHbTEwt8Zmg3a62X6mt_TdPfjF1z=sjMhKOHRpVQ2BJ6f6VwlFy947zf72s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VFl=7nW1JRasoor2SXqq4W5jhMEyrJeH7AzXN8J0mFecJVD1IPHk9VAHCdLpwXiErL8Vy'}




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)