get Tumblr stats


PHOTO EMBED

Fri Dec 04 2020 09:01:53 GMT+0000 (UTC)

Saved by @keypressingmonkey #python

def get_stats(account_email, account_password):
	print("Getting stats for account %s" % account_email)
	chrome_options = Options() 
	# chrome_options.add_argument("--headless")
	path_to_driver = os.path.join(
		os.path.dirname(os.path.dirname(os.getcwd())), "chromedriver.exe")
	driver = webdriver.Chrome(ChromeDriverManager().install(), options=chrome_options)
	# login
	driver.get("https://www.tumblr.com/login")
	driver.set_window_size(1294, 1400)
	driver.find_element(By.ID, "signup_determine_email").send_keys("youremailaddress")
	driver.find_element(By.ID, "signup_determine_email").send_keys(Keys.ENTER)
	time.sleep(1)
	driver.find_element(By.LINK_TEXT, "Use password to log in").click()
	time.sleep(1)
	driver.find_element(By.ID, "signup_password").send_keys("yourpassword")
	driver.find_element(By.ID, "signup_password").send_keys(Keys.ENTER)
content_copyCOPY