Guest User

Untitled

a guest
Oct 5th, 2020
1,385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. import os
  2. import time
  3. from colorama import *
  4. from selenium import webdriver as wd
  5. from selenium.webdriver.chrome.options import Options
  6. init()
  7.  
  8. logo = """
  9. _____ _____ _____ _ _______ _
  10. |_ _/ ____| | __ \ | | |__ __| | |
  11. | || | __ | |__) |___ _ __ ___ _ __| |_ | | ___ ___ | |
  12. | || | |_ | | _ // _ \ '_ \ / _ \| '__| __| | |/ _ \ / _ \| |
  13. _| || |__| | | | \ \ __/ |_) | (_) | | | |_ | | (_) | (_) | |
  14. |_____\_____| |_| \_\___| .__/ \___/|_| \__| |_|\___/ \___/|_|
  15. | |
  16. |_|
  17. """
  18.  
  19.  
  20. def main(username, full_name, wait_):
  21. times_reported = 0
  22. while True:
  23. options = Options()
  24. options.headless = False # Chrome Headless
  25. options.add_experimental_option('excludeSwitches', ['enable-logging'])
  26. driver = wd.Chrome('chromedriver.exe', options=options)
  27.  
  28. driver.get('https://help.instagram.com/contact/723586364339719')
  29. driver.find_element_by_xpath('//input[@name="Field258021274378282"]').send_keys(username)
  30. driver.find_element_by_xpath('//input[@name="Field735407019826414"]').send_keys(full_name)
  31. # Year
  32. driver.find_element_by_xpath('//span[@class="_55pe"]').click()
  33. driver.find_element_by_xpath('//ul[@class="_54nf"]//a[@title="2008"]').click()
  34. # Month
  35. driver.find_element_by_xpath('//a[@class="_p _55pi _5vto _55_p _2agf _4o_4 _4jy0 _4jy3 _517h _51sy _42ft"]//span[@class="_55pe"]').click()
  36. driver.find_element_by_xpath('//a[@title="February"]//span[@class="_54nh"]').click()
  37. # Day
  38. driver.find_element_by_xpath('//a[@class="_p _55pi _5vto _55_p _2agf _4o_4 _4jy0 _4jy3 _517h _51sy _42ft"]//span[@class="_55pe"]').click()
  39. driver.find_element_by_xpath('//a[@title="9"]//span[@class="_54nh"]').click()
  40. #
  41. driver.find_element_by_xpath('//select[@id="294540267362199"]//option[@value="Other"]').click()
  42. #
  43. driver.find_element_by_xpath('//button[@class="_42ft _4jy0 _4jy4 _4jy1 selected _51sy"]').click()
  44. time.sleep(4)
  45. driver.close()
  46. times_reported += 1
  47. print(Fore.LIGHTBLUE_EX + f'Reported {Fore.LIGHTGREEN_EX}{times_reported}{Fore.LIGHTBLUE_EX} Time/s' + Fore.RESET)
  48. time.sleep(wait_)
  49.  
  50.  
  51. def info():
  52. os.system('cls')
  53. print(Fore.LIGHTGREEN_EX + logo + Fore.RESET)
  54. username = input(Fore.LIGHTBLUE_EX + 'Username: @' + Fore.LIGHTGREEN_EX)
  55. full_name = input(Fore.LIGHTBLUE_EX + 'Full Name: ' + Fore.LIGHTGREEN_EX)
  56. wait_ = int(input(Fore.LIGHTBLUE_EX + 'Time to wait before the next report: ' + Fore.LIGHTGREEN_EX))
  57. main(username, full_name, wait_)
  58.  
  59.  
  60. print(Fore.LIGHTGREEN_EX + logo + Fore.RESET)
  61. info()
  62.  
Add Comment
Please, Sign In to add comment