Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #python spotify login test.
- #/!\ If emails and passwords aren't organized 'email:pass' this will not work /!\
- from selenium import webdriver
- import os
- os.system('clear')
- acc_list = raw_input('Enter Filename: ') #EX) spotify_accounts.txt
- with open(acc_list) as f:
- for x in f:
- email, passwd = f.readlines()[0].split(':') #If emails and password are organized in a different way, you can change from where the strings are here.
- #TEST print("the email is {0} and the password is {1}").format(email, passwd)
- browser = webdriver.Chrome()
- browser.get("www.spotify.com/login")
- email = browser.find_element_by_xpath('//*[@id="login-username"]')
- email.send_keys('enter your username/email')
- passwd = browser.find_element_by_xpath('//*[@id="login-password"]')
- passwd.send_keys('enter your password')
- lbutton = browser.find_element_by_xpath('/html/body/div[2]/div/form/div[3]/div[2]/button')
- lbutton.click()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement