0% found this document useful (0 votes)
62 views

INTERESTING Linkedin-Api-Datakund-Readthedocs-Io-En-Latest

This document describes the functions of a LinkedIn API automation library. It includes 35 functions for interacting with LinkedIn, such as logging in, searching for profiles, jobs, posts and companies, getting profile and company details, sending messages and connection requests, commenting on posts, and more. The functions are organized into sections for login/authentication, searching, profile access, messaging, and other miscellaneous functions like getting page titles.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

INTERESTING Linkedin-Api-Datakund-Readthedocs-Io-En-Latest

This document describes the functions of a LinkedIn API automation library. It includes 35 functions for interacting with LinkedIn, such as logging in, searching for profiles, jobs, posts and companies, getting profile and company details, sending messages and connection requests, commenting on posts, and more. The functions are organized into sections for login/authentication, searching, profile access, messaging, and other miscellaneous functions like getting page titles.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

linkedin-api-datakund

Release 0.0.2

datakund

Feb 11, 2022


CONTENTS:

1 Introduction 1

2 Installation/Usage: 3

3 Import bot-studio 5

4 Creating Object 7
4.1 Browser Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

5 Functions 9
5.1 Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.2 Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.3 Get Job Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.4 Search People . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.5 Search Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.6 Search Posts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.7 Enter Job Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.8 Send Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.9 Follow Company . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.10 Unfollow Company . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.11 Send Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.12 Get Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.13 Get Company Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.14 Click Next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.15 People Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.16 Jobs Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.17 Posts Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.18 Open Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.19 Comment On Post . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.20 Get Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.21 Send Message By Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.22 Upload Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.23 Search Companies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.24 Get Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.25 Companies Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.26 Search Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.27 Groups Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.28 Join Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.29 Get Post . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.30 Get Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

i
5.31 Click Load More . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.32 Posts Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.33 Login Cookie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.34 Accept Invitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.35 Clicknext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

6 Other Functions 23
6.1 Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.2 Get Page Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.3 Get Page Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.4 Get Current Url . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.5 Reload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.6 Keypress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.7 Scroll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.8 End . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.9 Quit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Index 27

ii
CHAPTER

ONE

INTRODUCTION

bot-studio is an automation library which can be used to automate tasks like sending mails,scraping data,auto check-
out and many more. You can download the source code from here(see here)
It uses selenium to automate the things. You can use its inbuilt functions like linkedin_follow, linkedin_login
etc. in a very easy way.

1
linkedin-api-datakund, Release 0.0.2

2 Chapter 1. Introduction
CHAPTER

TWO

INSTALLATION/USAGE:

You can find this package on Pypi (see here).


Command to install :- pip install bot-studio

3
linkedin-api-datakund, Release 0.0.2

4 Chapter 2. Installation/Usage:
CHAPTER

THREE

IMPORT BOT-STUDIO

from bot_studio import *

5
linkedin-api-datakund, Release 0.0.2

6 Chapter 3. Import bot-studio


CHAPTER

FOUR

CREATING OBJECT

linkedin=bot_studio.linkedin()
or
linkedin=bot_studio.linkedin(headless=True,....)

It will return the object which you can further use to call linkedin functions and opens a automated browser

4.1 Browser Options

Option Default Value Description


headless False Can set it to True if wants headless
proxy No proxy Pass proxy value e.g 98.0.2.5:4000
profile_path creates temporary profile Pass profile path e.g
C:\Users\username\AppData\Local\Google\Chrome\User
Data\
user_agent No user agent Pass user agent e.g python 2.7”, “platform”:”Windows
download_folder Downloads in default If want to set download directory to custom e.g E:files\
folder

7
linkedin-api-datakund, Release 0.0.2

8 Chapter 4. Creating Object


CHAPTER

FIVE

FUNCTIONS

bot-studio provides following functions for linkedin:-

5.1 Login

It will login to linkedin via your credentials.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.login(username='[email protected]', password='password@123')

Parameters
• username (str) – Linkedin username
• password (str) – Linkedin password
Returns {“body”: {}, “success_score”: “100”, “errors”: []}
Return type dict

5.2 Search

It searches the keyword passed in keyword.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.search(keyword='python')

Parameters keyword (str) – Search Keyword like python,hr


Returns {“body”: {}, “success_score”: “100”, “errors”: []}
Return type dict

9
linkedin-api-datakund, Release 0.0.2

5.3 Get Job Profile

It opens the job link passed in job_link and fetches info about job.
body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.get_job_profile(job_link='https://www.linkedin.com/jobs/search?keywords=python&origin=BLENDED_SEARCH_RE

Parameters job_link (str) – Link of the job posted


Returns {“body”: {‘Location’: ‘Location’, ‘Employment Type’: ‘Employment Type’, ‘Company
Name’: ‘Company Name’, ‘Industry’: ‘Industry’, ‘Experience’: ‘Experience’, ‘Roles’: ‘Roles’,
‘Job Functions’: ‘Job Functions’, ‘Applicants’: ‘Applicants’, ‘Title’: ‘Title’, ‘Published’: ‘Pub-
lished’, ‘Seniority Level’: ‘Seniority Level’}, “success_score”: “100”, “errors”: []}
Return type dict

5.4 Search People

It searches the keyword passed in keyword and opens people.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.search_people(keyword='Hr manager')

Parameters keyword (str) – Keyword need to be searched like hr,python


Returns {“body”: {}, “success_score”: “100”, “errors”: []}
Return type dict

5.5 Search Jobs

It searches the keyword passed in keyword and opens jobs.


Here is the code:-
linkedin.search_jobs(keyword='Python Developer')

Parameters keyword (str) – Keyword need to be searched like hr,python


Returns {}
Return type dict

10 Chapter 5. Functions
linkedin-api-datakund, Release 0.0.2

5.6 Search Posts

It searches the keyword passed in keyword and opens content.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.search_posts(keyword='Data Science')

Parameters keyword (str) – Keyword need to be searched like hr,python


Returns {“body”: {}, “success_score”: “100”, “errors”: []}
Return type dict

5.7 Enter Job Location

It fills location passed in location on search results page.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.enter_job_location(location='Delhi')

Parameters location (str) – pass location like delhi,goa


Returns {“body”: {}, “success_score”: “100”, “errors”: []}
Return type dict

5.8 Send Message

It sends message to user passed in profile_link with message as message.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.send_message(message='Hi', profile_link='https://www.linkedin.com/in/abhishek-chaudhary-/')

Parameters
• message (str) – message which need to be send
• profile_link (str) – profile link of user whom message need to be sent
Returns {“body”: {}, “success_score”: “100”, “errors”: []}

5.6. Search Posts 11


linkedin-api-datakund, Release 0.0.2

Return type dict

5.9 Follow Company

It follows the company passed in company_link.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.follow_company(company_link='https://www.linkedin.com/company/microsoft/')

Parameters company_link (str) – company link which need to be followed


Returns {“body”: {}, “success_score”: “100”, “errors”: []}
Return type dict

5.10 Unfollow Company

It unfollows the company passed in company_link.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.unfollow_company(company_link='https://www.linkedin.com/company/microsoft/')

Parameters company_link (str) – company link which need to be unfollowed


Returns {“body”: {}, “success_score”: “100”, “errors”: []}
Return type dict

5.11 Send Connection

It sends conection request to the user passed in profile_link.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.send_connection(profile_link='https://www.linkedin.com/in/abhishek-chaudhary-/')

Parameters profile_link (str) – Profile link of user to whom connection need to be sent
Returns {“body”: {}, “success_score”: “100”, “errors”: []}

12 Chapter 5. Functions
linkedin-api-datakund, Release 0.0.2

Return type dict

5.12 Get Profile

It fetches the profile of the user passed in profile_link.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.get_profile(profile_link='https://www.linkedin.com/in/abhishek-chaudhary-/')

Parameters profile_link (str) – Profile link of user whose data need to be fetched
Returns {“body”: {‘Location’: ‘Location’, ‘Info’: ‘Info’, ‘Education’: ‘Education’, ‘About’:
‘About’, ‘Experience’: ‘Experience’, ‘Education_Info’: ‘Education_Info’, ‘Recommendations’:
‘Recommendations’, ‘Mutual_Connections’: ‘Mutual_Connections’, ‘Name’: ‘Name’, ‘Inter-
ests’: ‘Interests’, ‘Current Company’: ‘Current Company’}, “success_score”: “100”, “errors”:
[]}
Return type dict

5.13 Get Company Profile

It fetches the profile of the company passed in company_link.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.get_company_profile(company_link='https://www.linkedin.com/company/microsoft/')

Parameters company_link (str) – Company link whose data need to be fetched


Returns {“body”: {‘Location’: ‘Location’, ‘Company Name’: ‘Company Name’, ‘Industry’: ‘Indus-
try’, ‘Info’: ‘Info’, ‘Followers’: ‘Followers’, ‘Overview’: ‘Overview’, ‘Type’: ‘Type’, ‘Founded’:
‘Founded’, ‘Website’: ‘Website’, ‘Company Size’: ‘Company Size’, ‘Specialities’: ‘Speciali-
ties’}, “success_score”: “100”, “errors”: []}
Return type dict

5.12. Get Profile 13


linkedin-api-datakund, Release 0.0.2

5.14 Click Next

It clicks on Next button on search results page.


Here is the code:-
linkedin.click_next()

Returns {}
Return type dict

5.15 People Results

It fetches the data of people on people search results page.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.people_results()

Returns {“body”: [{‘Link’: ‘Link’}], “success_score”: “100”, “errors”: []}


Return type dict

5.16 Jobs Results

It fetches the data of jobs on job search results page.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.jobs_results()

Returns {“body”: [{‘Link’: ‘Link’}], “success_score”: “100”, “errors”: []}


Return type dict

14 Chapter 5. Functions
linkedin-api-datakund, Release 0.0.2

5.17 Posts Results

It fetches the data of posts on content search results page.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.posts_results()

Returns {“body”: [{‘User Link’: ‘User Link’, ‘Post Text’: ‘Post Text’}], “success_score”: “100”,
“errors”: []}
Return type dict

5.18 Open Connections

It opens connections of the user passed in profile_link.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.open_connections(profile_link='https://www.linkedin.com/in/bhawna-vashisht-444174117/')

Parameters profile_link (str) – Profile link whose connections need to be opened


Returns {“body”: {}, “success_score”: “100”, “errors”: []}
Return type dict

5.19 Comment On Post

It comments on the post passed in post_link with comment in comment.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.comment_on_post(post_link='https://www.linkedin.com/posts/er-chirag-grover-290918101_help-
androiddevelopment-flutterappdevelopment-activity-6766960247794937856-2jh3',
comment='Please share your resume here [email protected]')

Parameters
• post_link (str) – post link where need to comment
• comment (str) – Text need to comment on post

5.17. Posts Results 15


linkedin-api-datakund, Release 0.0.2

Returns {“body”: {}, “success_score”: “100”, “errors”: []}


Return type dict

5.20 Get Messages

It fetch messages of user passed in profile_link.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.get_messages(profile_link='https://www.linkedin.com/in/abhishek-chaudhary-/')

Parameters profile_link (str) – Profile link whose messages need to be fetched


Returns {“body”: {‘Messegetext’: ‘Messegetext’}, “success_score”: “100”, “errors”: []}
Return type dict

5.21 Send Message By Name

It searches the keyword passed in keyword and clicks on first search result and send message passed in message.
body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.send_message_by_name(message='Hi', keyword='DataKund')

Parameters
• message (str) – Text need to comment on post
• keyword (str) – Name of the user who need to be searched
Returns {“body”: {}, “success_score”: “100”, “errors”: []}
Return type dict

5.22 Upload Content

It uploads the post passed in content.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-

16 Chapter 5. Functions
linkedin-api-datakund, Release 0.0.2

linkedin.upload_content(content='Hi, hope all are doing well.....')

Parameters content (str) – Post text need to be posted on linkedin


Returns {“body”: {}, “success_score”: “100”, “errors”: []}
Return type dict

5.23 Search Companies

It searches the keyword passed in keyword and opens companies results.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.search_companies(keyword='machine learning')

Parameters keyword (str) – Search keyword like microsoft,google


Returns {“body”: {}, “success_score”: “100”, “errors”: []}
Return type dict

5.24 Get Feed

It fetches the post content on linkedin feed page.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.get_feed()

Returns {“body”: [{‘Post Content’: ‘Post Content’, ‘UserLink’: ‘UserLink’, ‘User Name’: ‘User
Name’}], “success_score”: “100”, “errors”: []}
Return type dict

5.25 Companies Results

It fetches the companies data on search results page.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-

5.23. Search Companies 17


linkedin-api-datakund, Release 0.0.2

linkedin.companies_results()

Returns {“body”: [{‘CompanyLink’: ‘CompanyLink’, ‘Followers’: ‘Followers’, ‘Type’: ‘Type’,


‘Title’: ‘Title’}], “success_score”: “100”, “errors”: []}
Return type dict

5.26 Search Groups

It searches the keyword passed in keyword and opens group results.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.search_groups(keyword='artificial intelligence')

Parameters keyword (str) – Search keyword like python,machine learning


Returns {“body”: {}, “success_score”: “100”, “errors”: []}
Return type dict

5.27 Groups Results

It fetches data on group search results page.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.groups_results()

Returns {“body”: [{‘Group Link’: ‘Group Link’, ‘Title’: ‘Title’, ‘Members’: ‘Members’}], “suc-
cess_score”: “100”, “errors”: []}
Return type dict

5.28 Join Group

It joins the group passed in group_link.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-

18 Chapter 5. Functions
linkedin-api-datakund, Release 0.0.2

linkedin.join_group(group_link='https://www.linkedin.com/groups/2066905?lipi=urn%3Ali%3Apage%3Ad_flagship3_search_srp

Parameters group_link (str) – Link of group which need to be joined


Returns {“body”: {}, “success_score”: “100”, “errors”: []}
Return type dict

5.29 Get Post

It fetches data of post passed in post_link.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.get_post(post_link='https://www.linkedin.com/feed/update/urn:li:activity:6764456234197295104?updateEntityUrn=urn%

Parameters post_link (str) – Link of post whose data need to be fetched


Returns {“body”: {‘Time’: ‘Time’, ‘Post Text’: ‘Post Text’, ‘Profile_Link’: ‘Profile_Link’, ‘Likes’:
‘Likes’, ‘UserName’: ‘UserName’, ‘Bio’: ‘Bio’, ‘Comments’: ‘Comments’}, “success_score”:
“100”, “errors”: []}
Return type dict

5.30 Get Comments

It fetches the comments of the post currently opened in browser.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.get_comments()

Returns {“body”: [{‘User Link’: ‘User Link’, ‘Comment’: ‘Comment’, ‘UserName’: ‘UserName’,
‘Info’: ‘Info’}], “success_score”: “100”, “errors”: []}
Return type dict

5.29. Get Post 19


linkedin-api-datakund, Release 0.0.2

5.31 Click Load More

It clicks on click more on the comments page currently opened in browser.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.click_load_more()

Returns {“body”: {}, “success_score”: “100”, “errors”: []}


Return type dict

5.32 Posts Links

It fetches the links of posts on content search results page.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.posts_links()

Returns {“body”: [{‘Link’: ‘Link’}], “success_score”: “100”, “errors”: []}


Return type dict

5.33 Login Cookie

It will login to linkedin via your cookies.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.login_cookie(cookies=[{'domain': '.linkedin.com', 'expirationDate': 1676524503, 'hostOnly': false,
'httpOnly': false, 'name': '_ga'}, ...])

Parameters cookies (str) – list of cookies of linkedin


Returns {“body”: {}, “success_score”: “100”, “errors”: []}
Return type dict

20 Chapter 5. Functions
linkedin-api-datakund, Release 0.0.2

5.34 Accept Invitation

It accepts first invitation on invitation page


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.accept_invitation()

Returns {“body”: {}, “success_score”: “100”, “errors”: []}


Return type dict

5.35 Clicknext

It clicks on Next button on search results page.


body: returns data
success_score: api success rate
errors: errors encountered in api
Here is the code:-
linkedin.clicknext()

Returns {“body”: {}, “success_score”: “100”, “errors”: []}


Return type dict

5.34. Accept Invitation 21


linkedin-api-datakund, Release 0.0.2

22 Chapter 5. Functions
CHAPTER

SIX

OTHER FUNCTIONS

You can use basic functions which selenium provides with this library like opening a url, get pagesource, get current
url etc. These are the functions:-

6.1 Open

It will open the url provided in the argument.


linkedin.open(url)

Parameters url (str) – Link which need to be opened


Returns {}
Return type dict

6.2 Get Page Title

It returns the title of page opened.


linkedin.get_page_title()

Returns {“pagetitle”:”Linkedin”}
Return type dict

6.3 Get Page Source

It returns the pagesource of page opened.


linkedin.get_page_source()

Returns {“pagesource”:”pagesource”}
Return type dict

23
linkedin-api-datakund, Release 0.0.2

6.4 Get Current Url

It returns the pagesource of page opened.


linkedin.get_current_url()

Returns {“url”:”url”}
Return type dict

6.5 Reload

It reloads the page opened.


linkedin.reload()

Returns {}
Return type dict

6.6 Keypress

It perform the keypress passed.


linkedin.keypress(key)

Parameters key (str) – Key which need to be pressed, e.g pagedown,arrowleft,enter


Returns {}
Return type dict

6.7 Scroll

It scrolls to the end of page.


linkedin.scroll()

Returns {}
Return type dict

6.8 End

It ends the linkedin session and close the automated chromedriver.

Note: You will need to create linkedin object again after end().

linkedin.end()

24 Chapter 6. Other Functions


linkedin-api-datakund, Release 0.0.2

Returns {}
Return type dict

6.9 Quit

It quits the bot-studio application runing in background.

Note: You will need to import bot-studio library again to start application.

linkedin.quit()

Returns {}
Return type dict

6.9. Quit 25
linkedin-api-datakund, Release 0.0.2

26 Chapter 6. Other Functions


INDEX

B linkedin.send_message(), 11
built-in function linkedin.send_message_by_name(), 16
linkedin.accept_invitation(), 21 linkedin.unfollow_company(), 12
linkedin.click_load_more(), 20 linkedin.upload_content(), 16
linkedin.click_next(), 14
linkedin.clicknext(), 21 L
linkedin.comment_on_post(), 15 linkedin.accept_invitation()
linkedin.companies_results(), 17 built-in function, 21
linkedin.end(), 24 linkedin.click_load_more()
linkedin.enter_job_location(), 11 built-in function, 20
linkedin.follow_company(), 12 linkedin.click_next()
linkedin.get_comments(), 19 built-in function, 14
linkedin.get_company_profile(), 13 linkedin.clicknext()
linkedin.get_current_url(), 24 built-in function, 21
linkedin.get_feed(), 17 linkedin.comment_on_post()
linkedin.get_job_profile(), 10 built-in function, 15
linkedin.get_messages(), 16 linkedin.companies_results()
linkedin.get_page_source(), 23 built-in function, 17
linkedin.get_page_title(), 23 linkedin.end()
linkedin.get_post(), 19 built-in function, 24
linkedin.get_profile(), 13 linkedin.enter_job_location()
linkedin.groups_results(), 18 built-in function, 11
linkedin.jobs_results(), 14 linkedin.follow_company()
linkedin.join_group(), 18 built-in function, 12
linkedin.keypress(), 24 linkedin.get_comments()
linkedin.login(), 9 built-in function, 19
linkedin.login_cookie(), 20 linkedin.get_company_profile()
linkedin.open(), 23 built-in function, 13
linkedin.open_connections(), 15 linkedin.get_current_url()
linkedin.people_results(), 14 built-in function, 24
linkedin.posts_links(), 20 linkedin.get_feed()
linkedin.posts_results(), 15 built-in function, 17
linkedin.quit(), 25 linkedin.get_job_profile()
linkedin.reload(), 24 built-in function, 10
linkedin.scroll(), 24 linkedin.get_messages()
linkedin.search(), 9 built-in function, 16
linkedin.search_companies(), 17 linkedin.get_page_source()
linkedin.search_groups(), 18 built-in function, 23
linkedin.search_jobs(), 10 linkedin.get_page_title()
linkedin.search_people(), 10 built-in function, 23
linkedin.search_posts(), 11 linkedin.get_post()
linkedin.send_connection(), 12 built-in function, 19

27
linkedin-api-datakund, Release 0.0.2

linkedin.get_profile()
built-in function, 13
linkedin.groups_results()
built-in function, 18
linkedin.jobs_results()
built-in function, 14
linkedin.join_group()
built-in function, 18
linkedin.keypress()
built-in function, 24
linkedin.login()
built-in function, 9
linkedin.login_cookie()
built-in function, 20
linkedin.open()
built-in function, 23
linkedin.open_connections()
built-in function, 15
linkedin.people_results()
built-in function, 14
linkedin.posts_links()
built-in function, 20
linkedin.posts_results()
built-in function, 15
linkedin.quit()
built-in function, 25
linkedin.reload()
built-in function, 24
linkedin.scroll()
built-in function, 24
linkedin.search()
built-in function, 9
linkedin.search_companies()
built-in function, 17
linkedin.search_groups()
built-in function, 18
linkedin.search_jobs()
built-in function, 10
linkedin.search_people()
built-in function, 10
linkedin.search_posts()
built-in function, 11
linkedin.send_connection()
built-in function, 12
linkedin.send_message()
built-in function, 11
linkedin.send_message_by_name()
built-in function, 16
linkedin.unfollow_company()
built-in function, 12
linkedin.upload_content()
built-in function, 16

28 Index

You might also like