This code is not intended for webscrapping, but for supervised low-scale information extraction.
It is important to mention that Linkedin is a very difficult site to implement a bot, because it changes the XPATHS when it detects abnormal patterns.
This supervised bot has the ability to extract the name, job position, duration of the position, total duration in the target company, company that was left
- name: the full name registered in linkedin
- job position: the full name(s) of the position(s) he/she held/holds at [target company] that he/she has registered.
- duration of the position: duration in months that he/she worked in that position
- total duration in the target company: duration in months that he/she worked at that company, regardless of the number of positions he held.
- company that was left: the link of the company he/she left when he/she resigned from the [target company], in case he/she is a current employee, it will be the link of the [target company]
First you must install the requirements.
pip install -r requirements.txt
Second you must provide your credentials in config.json
.
Additionally, you should know that in the "LINKEDIN_TARGET_COMPANY"
variable, you should enter the target company.
The target company is the company from which you want to extract information about its current or former employees.
In this example the target company is Microsoft
"LINKEDIN_TARGET_COMPANY": "https://www.linkedin.com/company/157240/"
- Go to a profile of someone who has worked at the target company.
- Right click on the company logo and then inspect the element.
- Find the anchor element in the HTML, and copy the link.
- Run the code and wait for login
The console will display this message:(don't press Enter yet)
Press Enter when you are in the list of people who work or used to work in the target company.
- Type in the search box the company target
- Active "People"
- Select "All Filters"
- Activate the checkboxes of your preferences. (Locations, Current Company, Past Company)
- Select "Show Results"
- Press Enter
If this message is displayed, please click the next page, and then click enter in the console
I could't find the 'next' bottom, please click 'next' and then enter :(
- Publicly thanks 😊
- Follow me in LinkedIn
- Donate with USDT (Solana Chain) to this address:
2rqXY9bB7HiEJt7ozj35dKE7gU7DNX2723riQmt8z6Hh
- Donate with USDT (BNB Smart Chain) to this address
0x3dae29cde0cc13169bc82d573b63eb13016b29a9