Guest User

Untitled

a guest
Jun 24th, 2018
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. import requests
  3. from bs4 import BeautifulSoup
  4.  
  5. class bosslike(object):
  6. def auth_(self):
  7. session = requests.session()
  8. url = 'http://bosslike.ru/login/'
  9. params = {'UserLogin[login]': u'pu2ok54y.iap@20minutemail.it',
  10. 'UserLogin[password]': u'pu2ok54y.iap@20minutemail.it',
  11. 'submitLogin': u'Войти'}
  12.  
  13. headers = {
  14. 'Host': 'bosslike.ru',
  15. 'Accept': '*/*',
  16. 'Accept-Language': 'en-US,en;q=0.9',
  17. 'Accept-Encoding': 'gzip, deflate, br',
  18. 'Content-Type': 'application/x-www-form-urlencoded',
  19. 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0',
  20. 'Set-Cookie': 'PHPSESSID=65168a6ed4ac12e3045b89571cc1c1be; path=/; HttpOnly',
  21. 'CF-RAY': '42fc9c20768985e9-ARN',
  22. 'Location': 'http://bosslike.ru/tasks/my/',
  23. 'Referer': 'http://bosslike.ru/login/'
  24. }
  25. r = session.post(url,params,headers)
  26. print(r.text)
  27.  
  28.  
  29. if __name__ == '__main__':
  30. bosslike = bosslike()
  31. bosslike.auth_()
Add Comment
Please, Sign In to add comment