Answer the question
In order to leave comments, you need to log in
How to order a taxi in citymobile using Python?
import requests
headers = {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 YaBrowser/21.8.2.381 Yowser/2.5 Safari/537.36"
}
data1 = {
"del_latitude": "55.754429",
"del_longitude": "37.621014",
"hurry": "1",
"latitude": "55.77468083",
"locale": "ru",
"longitude": "37.65577947",
"method": "getprice",
"options": [],
"os_version": "web mobile-web",
"payment_type": "cash",
"phone_os": "widget",
"source": "O",
"tariff_group": "2",
"ver": "4.59.0"
}
data2 = {
"brand": "citymobil",
"locale": "ru",
"method": "addnewclient",
"model": "widget",
"os_version": "web mobile-web",
"phone": "79278111470",
"phone_os": "widget",
"ver": "4.59.0"
}
session = requests.session()
response1 = session.post("https://widget.city-mobil.ru/c-api", headers=headers, data=data1)
print(response1.text)
response2 = session.post("https://widget.city-mobil.ru/c-api", headers=headers, data=data2)
print(response2.text)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question