def e_way():
"""Get data"""
import httpx
uri = "https://eway.elevel.ru/api/goods_new/?category_id=0&own=6101"
client = httpx.Client()
r = client.post(
url=uri,
headers={
"Host": "eway.elevel.ru",
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0",
"Accept": "application/json, text/javascript, */*; q=0.01",
"Accept-Language": "en-US,en;q=0.5",
"Accept-Encoding": "gzip, deflate",
"Content-Type": "pplication/x-www-form-urlencoded; charset=UTF-8",
"X-Request-ID": "c6bd4e99f21eea69cb291511473bf936",
"X-Requested-With": "XMLHttpRequest",
"Origin": "https://eway.elevel.ru",
"Connection": "keep-alive",
"Referer": "https://eway.elevel.ru/goods/0/",
"Cookie": "basket=7023202; contract=6101; user_uuid=687b14a6-e6aa-4661-824f-1c058c149b2e; _ym_uid=1654725714994683832; _ym_d=1654725714; _ym_isad=1",
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Dest": "document",
"Sec-Fetch-Mode": "navigate",
"Sec-Fetch-Site": "same-origin",
"Sec-Fetch-User": "?1",
},
# add necessary params if need
params={
"draw": "1",
"columns[0][data]": "0",
"columns[0][name]": "articul",
"columns[0][searchable]": "true",
"columns[0][orderable]": "true",
"columns[0][search][value]": "",
"columns[0][search][regex]": "false",
"columns[1][data]": "1",
"columns[1][name]": "photo",
"columns[1][searchable]": "true",
"columns[1][orderable]": "false",
"columns[1][search][value]": "",
"columns[1][search][regex]": "false",
"columns[2][data]": "2",
"columns[2][name]": "certificate",
"columns[2][searchable]": "true",
"columns[2][orderable]": "false",
"columns[2][search][value]": "",
"columns[2][search][regex]": "false",
"columns[3][data]": "3",
"columns[3][name]": "configurator",
"columns[3][searchable]": "true",
"columns[3][orderable]": "false",
"columns[3][search][value]": "",
"columns[3][search][regex]": "false",
"columns[4][data]": "4",
"columns[4][name]": "name",
"columns[4][searchable]": "true",
"columns[4][orderable]": "true",
"columns[4][search][value]": "",
"columns[4][search][regex]": "false",
"columns[5][data]": "5",
"columns[5][name]": "category",
"columns[5][searchable]": "true",
"columns[5][orderable]": "false",
"columns[5][search][value]": "",
"columns[5][search][regex]": "false",
"columns[6][data]": "6",
"columns[6][name]": "type",
"columns[6][searchable]": "true",
"columns[6][orderable]": "true",
"columns[6][search][value]": "",
"columns[6][search][regex]": "false",
"columns[7][data]": "7",
"columns[7][name]": "producer",
"columns[7][searchable]": "true",
"columns[7][orderable]": "true",
"columns[7][search][value]": "",
"columns[7][search][regex]": "false",
"columns[8][data]": "8",
"columns[8][name]": "storage",
"columns[8][searchable]": "true",
"columns[8][orderable]": "true",
"columns[8][search][value]": "",
"columns[8][search][regex]": "false",
"columns[9][data]": "9",
"columns[9][name]": "pack",
"columns[9][searchable]": "true",
"columns[9][orderable]": "true",
"columns[9][search][value]": "",
"columns[9][search][regex]": "false",
"columns[10][data]": "10",
"columns[10][name]": "step",
"columns[10][searchable]": "true",
"columns[10][orderable]": "true",
"columns[10][search][value]": "",
"columns[10][search][regex]": "false",
"columns[11][data]": "11",
"columns[11][name]": "price",
"columns[11][searchable]": "true",
"columns[11][orderable]": "true",
"columns[11][search][value]": "",
"columns[11][search][regex]": "false",
"columns[12][data]": "12",
"columns[12][name]": "tariff_price",
"columns[12][searchable]": "true",
"columns[12][orderable]": "true",
"columns[12][search][value]": "",
"columns[12][search][regex]": "false",
"columns[13][data]": "13",
"columns[13][name]": "special_offers",
"columns[13][searchable]": "true",
"columns[13][orderable]": "true",
"columns[13][search][value]": "",
"columns[13][search][regex]": "false",
"columns[14][data]": "14",
"columns[14][name]": "cart",
"columns[14][searchable]": "true",
"columns[14][orderable]": "true",
"columns[14][search][value]": "",
"columns[14][search][regex]": "false",
"order[0][column]": "14",
"order[0][dir]": "desc",
"start": "100",
"length": "100",
"search[value]": "",
"search[regex]": "false",
"sentens": "",
},
)
print("[*Response ]\n", r.json())
if __name__ == "__main__":
e_way()