Advertisement
Guest User

Untitled

a guest
Aug 15th, 2012
4,211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. import requests
  2.  
  3. # Login URL - https://instagram.com/accounts/login/?next=/accounts/edit/
  4. # Reg URL - http://instagram.com/api/v1/push/register/?platform=7&device_type=ios
  5. # Mass Follow URL - http://instagram.com/api/v1/friendships/create_many/
  6.  
  7. def login():
  8. # Assign headers
  9. txheaders = {'User-agent' : 'Instagram 2.5.0 (iPad; iPhone OS 5.1.1; en_GB)'}
  10.  
  11. # Assign url to pass (login url in this case)
  12. url = 'https://instagram.com/accounts/login/?next=/accounts/edit/'
  13.  
  14. # Assign cookies to use to spoof login
  15. cookies = {
  16. '__utma': '1.238572629.1342045326.1342081337.1342110446.5',
  17. '__utmb': '1.5.10.1342110446',
  18. '__utmc': '1',
  19. '__utmz': '1.1342045326.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
  20. 'sessionid': 'IGSC3c2639fb6d884686ec61a50ec677a1ddc16723e20d133dc939e2373bf08efcb4%3ASt4Ep2OMixSHmlT1OF043U7yT15gPsqE%3A%7B%7D',
  21. 'csrftoken': 'XXXXXXX',
  22. 'ds_user_id': 'XXXXXXX'
  23. }
  24.  
  25. # Request url with cookies, headers, and redirects enabled.
  26. r = requests.get(url, cookies=cookies, headers=txheaders, allow_redirects=True)
  27.  
  28. # Show the page source
  29. print r.text
  30.  
  31.  
  32. login()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement