I found I need to send a session id x-connection-id
which is stored by server side Javascript localStorage.setItem("x-connection-id")
If and only if I get this id, so that I can keep going the following request.
Any idea ?
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36',
'x-connect-id': 'i need it',
}
req.get('/api/v1//flightavailability?'+urllib.parse.urlencode(params))
I found I need to send a session id x-connection-id
which is stored by server side Javascript localStorage.setItem("x-connection-id")
If and only if I get this id, so that I can keep going the following request.
Any idea ?
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36',
'x-connect-id': 'i need it',
}
req.get('https://api.sample/api/v1//flightavailability?'+urllib.parse.urlencode(params))
Share
Improve this question
asked Oct 31, 2015 at 4:31
newBikenewBike
15k29 gold badges118 silver badges204 bronze badges
1 Answer
Reset to default 5Seems like it's impossible
Local storage is specific to browser.
Local Storage is a way to store persistent data using JavaScript. It should be used only with HTML5 patible web browser.
To access Local storage in python, a patible browser's python API is required.