From c0c628bdb01e8a7601eb71b3f699e647afe30599 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Wed, 19 Jul 2023 07:44:57 +0000 Subject: [PATCH] style: format code with autopep8 Format code with autopep8 This commit fixes the style issues introduced in a7d1e3e according to the output from Autopep8. Details: https://app.deepsource.com/gh/avinashkranjan/Amazing-Python-Scripts/transform/7544df83-e18c-468c-a4d2-e626ccc20337/ --- Auto-Linkedin/Auto-LinkedIn.py | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/Auto-Linkedin/Auto-LinkedIn.py b/Auto-Linkedin/Auto-LinkedIn.py index 84a7f49996..a431e03319 100644 --- a/Auto-Linkedin/Auto-LinkedIn.py +++ b/Auto-Linkedin/Auto-LinkedIn.py @@ -1,26 +1,35 @@ -from selenium import webdriver #connect python with webbrowser-chrome +from selenium import webdriver # connect python with webbrowser-chrome from selenium.webdriver.common.keys import Keys import pyautogui as pag + def main(): - url = "http://linkedin.com/" #url of LinkedIn + url = "http://linkedin.com/" # url of LinkedIn network_url = "http://linkedin.com/mynetwork/" # url of LinkedIn network page - driver = webdriver.Chrome('F:\Argha\WebDriver\chromedriver.exe') # path to browser web driver + # path to browser web driver + driver = webdriver.Chrome('F:\Argha\WebDriver\chromedriver.exe') driver.get(url) + def login(): - username = driver.find_element_by_id("login-email") # Getting the login element - username.send_keys("username") # Sending the keys for username - password = driver.find_element_by_id("login-password") # Getting the password element - password.send_keys("password") # Sending the keys for password - driver.find_element_by_id("login-submit").click() # Getting the tag for submit button + username = driver.find_element_by_id( + "login-email") # Getting the login element + # Sending the keys for username + username.send_keys("username") + password = driver.find_element_by_id( + "login-password") # Getting the password element + # Sending the keys for password + password.send_keys("password") + # Getting the tag for submit button + driver.find_element_by_id("login-submit").click() + def goto_network(): driver.find_element_by_id("mynetwork-tab-icon").click() + def send_requests(): - n= input("Number of requsts: ") # Number of requests you want to send - for i in range(0,n): - pag.click(880,770) # position(in px) of connection button + n = input("Number of requsts: ") # Number of requests you want to send + for i in range(0, n): + pag.click(880, 770) # position(in px) of connection button print("Done!") -