Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

linkedin bot python

# connect python with webbrowser-chrome
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import pyautogui as pag
  
  
def login():
 
    # Getting the login element
    username = driver.find_element_by_id("login-email")
 
    # Sending the keys for username     
    username.send_keys("username")
 
    # Getting the password element                                 
    password = driver.find_element_by_id("login-password")
 
    # 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():
 
    # Number of requests you want to send
    n = input("Number of requests: ")
   
    for i in range(0, n):
        # position(in px) of connection button
        pag.click(880, 770) 
    print("Done !")
  
def main():
 
    # url of LinkedIn
    url = "http://linkedin.com/" 
 
    # url of LinkedIn network page
    network_url = "http://linkedin.com / mynetwork/"  
 
    # path to browser web driver
    driver = webdriver.Chrome('C:Program FilesWeb Driverchromedriver.exe')    
    driver.get(url)
 
# Driver's code
if __name__ == __main__:
    main()
Comment

PREVIOUS NEXT
Code Example
Python :: flask login attemted_user cant see check_password_correction method 
Python :: python for loop skip iteration if condition not met jinja 
Python :: Frog Jump time complexity 
Python :: how to scrape data from github api python 
Python :: replace string in dictionary python 
Python :: ring Copy Lists 
Python :: ring PostgreSQL load the postgresqllib.ring library 
Python :: swagger django 
Python :: ring Load Syntax Files 
Python :: python rational numbers 
Python :: open urls using python grepper 
Python :: Python soma números 
Python :: python sleep for 1 minute 
Python :: How to make exit button? 
Python :: dice throw program in python 
Python :: insertar en una lista anidada python 
Python :: separate array along axis 
Python :: python seeded random 
Python :: how to multiply integer value with float values in python 
Python :: Obtener el valor ASCII de un carácter en Python 
Python :: delete history django simple 
Python :: pandas data frame from part of excel easy 
Python :: python http handler iis 
Python :: python drop in tuple 
Python :: Code converter C++ to python 
Python :: how to insert an array as a parameter in python 
Python :: not all arguments converted during string formatting postgresql 
Python :: how to open Website from CMD using python 
Python :: opening aws images with pillow 
Python :: How to check if variable exists in a column 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =