Skip to content

Instantly share code, notes, and snippets.

@valericus
Last active September 30, 2015 16:16
Show Gist options
  • Save valericus/3454a51875ec92ea1aaa to your computer and use it in GitHub Desktop.
Save valericus/3454a51875ec92ea1aaa to your computer and use it in GitHub Desktop.
import requests
login = 'asdaf'
password = 'afaweef'
data = {
'USER_LOGIN': login,
'USER_PASSWORD': password,
'backurl': '/private/',
'AUTH_FORM': 'Y',
'TYPE': 'AUTH'}
result = requests.put('https://sokolov.ru/private/?login=yes', data=data)
cookies = result.cookies
result = requests.get('https://sokolov.ru/private/', cookies=cookies)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment