From b8d23b13150fce20887bca254f2545e9483be0f6 Mon Sep 17 00:00:00 2001 From: sayampradhan <112542130+sayampradhan@users.noreply.github.com> Date: Sat, 15 Oct 2022 01:10:39 +0530 Subject: [PATCH] Clean Code --- .../Project _ Automatic FB login.py | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Automatic FB login/Project _ Automatic FB login.py b/Automatic FB login/Project _ Automatic FB login.py index abde7f5..799968a 100644 --- a/Automatic FB login/Project _ Automatic FB login.py +++ b/Automatic FB login/Project _ Automatic FB login.py @@ -3,24 +3,26 @@ from selenium.webdriver.common.keys import Keys -user_id=input('Enter User Id of your Fb Account :') # Take user id and password as input from the user -password=input('Enter the password :') +user_id = input( + "Enter User Id of your Fb Account :" +) # Take user id and password as input from the user +password = input("Enter the password :") print(user_id) print(password) -cd='C:\\webdrivers\\chromedriver.exe' #path to your chrome driver +cd = "C:\\webdrivers\\chromedriver.exe" # path to your chrome driver -browser= webdriver.Chrome(cd) -browser.get('https://www.facebook.com/') +browser = webdriver.Chrome(cd) +browser.get("https://www.facebook.com/") -user_box = browser.find_element_by_id("email") # For detecting the user id box -user_box.send_keys(user_id) # Enter the user id in the box +user_box = browser.find_element_by_id("email") # For detecting the user id box +user_box.send_keys(user_id) # Enter the user id in the box -password_box = browser.find_element_by_id("pass") # For detecting the password box -password_box.send_keys(password) # For detecting the password in the box +password_box = browser.find_element_by_id("pass") # For detecting the password box +password_box.send_keys(password) # For detecting the password in the box -login_box = browser.find_element_by_id("u_0_b") # For detecting the Login button +login_box = browser.find_element_by_id("u_0_b") # For detecting the Login button login_box.click()