Follow these steps to set up and run the project on your local machine.
Make sure you have the following prerequisites installed on your machine:
git clone https://github.com/itsApurba/company-people.git
cd company-people
npm i
-
Install EditThisCookie Extension:
- Install the EditThisCookie extension from https://www.editthiscookie.com.
-
Login to LinkedIn:
- Log in to your LinkedIn profile using the browser where you've installed the extension.
-
Export the Cookie:
- Export the cookie from the EditThisCookie extension.
-
Create
auth
File:- Create a file named
auth
in the root directory (if not present). - Paste the copied cookie into the
auth
file.
- Create a file named
- LinkedIn URL Format:
- The URL format should be
https://www.linkedin.com/company/company-name/
. - Obtain this URL by visiting the LinkedIn company profile page.
- The URL format should be
- Move and Rename CSV:
- Move the CSV file to the root directory.
- Rename the CSV file to
data.csv
(refer to the example).
Execute the following command to run the script:
npm start
The output file will be generated at
./storage/key_value_stores/default/data.csv.
-
Issue:
- Cookies generated for LinkedIn may expire after a certain period.
-
Solution:
- Periodically regenerate the LinkedIn cookie when you encounter issues due to cookie expiration.
- Repeating the setup process (refer to Setting Up the Cookie) by generating a new cookie through the provided steps will resolve this issue.
-
Note:
- Periodic regeneration of the cookie is recommended.
-
Automate Cookie Generation Process:
- Implement an automated process for generating the LinkedIn cookie.
- Handle captchas that may be encountered during the cookie generation to ensure seamless automation.
-
Direct CSV Retrieval from Google Sheets:
- Develop a feature to directly fetch CSV data from Google Sheets.
-
Note:
- By default, the script runs in headless mode, which means the browser operates in the background without a visible UI to the user.
- To view the browser in action (note that this may consume more memory), you can modify the configuration in the
main.js
file.
-
Steps:
- Open the
main.js
file. - Locate the configuration setting for headless mode.
- Set the value to
false
:// Change this line from true to false headless: false;
- Open the
-
Caution:
- Enabling non-headless mode may impact memory usage, especially when dealing with a large number of browser instances.