Skip to content

Instantly share code, notes, and snippets.

@lopezjurip
Last active March 14, 2017 18:51
Embed
What would you like to do?
import requests
url = 'https://chile.rutificador.com/'
client = requests.session()
client.get(url)
csrftoken = client.cookies['csrftoken']
url = url + 'get_generic_ajax/'
data = {
'entrada': 'Pedro',
'csrfmiddlewaretoken': csrftoken,
}
headers = {
'Referer': url,
}
response = client.post(url, data=data, headers=headers)
response.json()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment