Advertisement
Br1in

BotCheckCountQuizAndPool

Apr 9th, 2021
1,159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. import requests
  2. print("[1] Quiz (1,2,3,4)\n[2] Poll (<>)")
  3. Ya = int(input("[+] Enter Number : "))
  4. headers = {
  5. "User-Agent": "Instagram 113.0.0.39.122 Android (24/5.0; 515dpi; 1440x2416; huawei/google; Nexus 6P; angler; angler; en_US)",
  6. "Accept": "*/*",
  7. "Accept-Encoding": "gzip, deflate",
  8. "Accept-Language": "en-US",
  9. "X-IG-Capabilities": "3brTvw==",
  10. "X-IG-Connection-Type": "WIFI",
  11. "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
  12. 'Host': 'i.instagram.com',
  13. 'Connection': 'keep-alive'
  14. }
  15. url = 'https://i.instagram.com/api/v1/accounts/login/'
  16. username = str(input("[+] Enter Username : "))
  17. password = str(input("[+] Enter Password : "))
  18. target = input("[+] Enter Target : ")
  19. Number = int(input("[+] Enter Number Story : "))
  20. def Check():
  21. global target, Number, username, password
  22. data = {
  23. 'uuid': 'e3357faa-92ab-401b-8465-9599857d1fce',
  24. 'password': password,
  25. 'username': username,
  26. 'device_id': 'e3357faa-92ab-401b-8465-9599857d1fce',
  27. 'from_reg': 'false',
  28. '_csrftoken': 'missing',
  29. 'login_attempt_countn': '0'
  30. }
  31. req = requests.post(url, data=data, headers=headers)
  32. hed = {
  33. 'user-agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36',
  34. 'x-csrftoken': 'xX0K5q7XikrU1LAnenqEVKqb7J3qK4S6',
  35. 'x-ig-app-id': '936619743392459',
  36. 'x-instagram-ajax': '0c15f4d7d44a',
  37. 'x-requested-with': 'XMLHttpRequest'
  38. }
  39. if not req.status_code == 200:
  40. print(f"[+] Error Login @{username}")
  41. else:
  42. print(f"[+] Done Login @{username}")
  43. coo = req.cookies
  44. head = {
  45. "Host": "i.instagram.com",
  46. "User-Agent": "Mozilla/5.0 (X11; Linux i686; rv:78.0) Gecko/20100101 Firefox/78.0",
  47. "Accept": "*/*",
  48. "Accept-Language": "en-US,en;q=0.5",
  49. "Referer": "https://www.instagram.com/",
  50. "X-IG-App-ID": "936619743392459",
  51. "X-IG-WWW-Claim": "hmac.AR12Fs18fzvYP9jCne1dhLjB5a8pdPtPh17yqrMQzdvWj2dQ",
  52. "Origin": "https://www.instagram.com",
  53. "DNT": "1",
  54. "Connection": "keep-alive"
  55. }
  56. fid = requests.get(f"https://www.instagram.com/{target}/?__a=1", headers=hed, cookies=coo)
  57. i = fid.json()['graphql']['user']['id']
  58. url_store = f"https://i.instagram.com/api/v1/feed/reels_media/?reel_ids={i}"
  59. r = requests.get(url_store, headers=head, cookies=coo)
  60. Number -= 1
  61. if Ya == 1:
  62. count = str(r.json()['reels_media'][0]['items'][Number]['story_quizs'][0]['quiz_sticker']['tallies'])
  63. print(count)
  64. elif Ya == 2:
  65. count = str(r.json()['reels_media'][0]['items'][Number]['story_polls'][0]['poll_sticker']['tallies'])
  66. print(count)
  67. else:
  68. print('[+] What You Want??')
  69. input()
  70. exit()
  71. Check()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement