Skip to content

Instantly share code, notes, and snippets.

@Ashutoshkumargautam
Created September 13, 2020 07:52
Show Gist options
  • Save Ashutoshkumargautam/121e60b28caa4b73acb39edd40f6ceac to your computer and use it in GitHub Desktop.
Save Ashutoshkumargautam/121e60b28caa4b73acb39edd40f6ceac to your computer and use it in GitHub Desktop.
from selenium import webdriver
def loginBOT(usr, pas):
br = webdriver.Firefox()
br.get("https://web.facebook.com/")
user = br.find_element_by_css_selector("#email")
user.clear()
user.send_keys(usr)
passwd = br.find_element_by_css_selector("#pass")
passwd.clear()
passwd.send_keys(pas)
btn = br.find_element_by_css_selector("#u_0_5")
btn.click()
if __name__ == "__main__":
loginBOT('username or email', 'yourpassword')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment