Giter VIP home page Giter VIP logo

linkedin-job-scraper's Introduction

LinkedIn Job Scraper

Program to scrape and store a constant stream of LinkedIn job postings and dozens of their respective attributes

Download the polished dataset and view insights at - https://www.kaggle.com/datasets/arshkon/linkedin-job-postings

User Configurations

Required

  • logins.csv
    • Populate with multiple LinkedIn logins
    • Specify the purpose of the login (search or detail retreiever)
    • I recommend 1-3 logins for search and the remaining for more expensive attribute retrieval

Optional

  • details_retriever.py
    • MAX_UPDATES: - Number of job postings to look up before sleeping. Increase with more accounts/proxies (default = 25)
    • SLEEP_TIME: - Seconds to sleep between every iteration (default = 60)

Running

This program consists of 2 main scripts, running in parallel.

python search_retriever.py - discovers new job postings and insert the most recent IDs and minimal attributes into the database

python details_retriever.py - populates tables with complete job attributes

It's important to note that while search_retriever.py typically runs smoothly, even through your personal IP and a singular account, details_retriever.py can be a bit finicky. Each search generates approximately 25-50 results, all of which must be individually queried to obtain their attributes. To enhance its performance, I recommend the following strategies:

  • Utilize multiple proxies and accounts when running details_retriever.py.
  • Experiment with different time delays to find the optimal settings.
  • Run details_retriever.py during periods of lower online activity, such as late-night hours and weekends, to catch up with the progress of search_retriever.py. This will ensure that both processes remain synchronized and up to date.

Converting Database to CSV

python to_csv.py --folder <destination folder> --database <linkedin_jobs.db>

Creates a CSV file for each database, along with minimal preprocessing

Database Structure

You can find the structure of the database here

linkedin-job-scraper's People

Contributors

andhikawb avatar arshka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

linkedin-job-scraper's Issues

Support for Multiple Job Posting Websites

Hi,

First of all truly amazing work, thanks for sharing!

Was wondering if you plan to support for multiple job listings website (e.g. indeed, glassdoor)? I am doing a company name matching research and would be very intrested in the potential of creating a real dataset using natural name variations in different websites, which can be mapped using job descriptions

Thx.

Browser closes itself and errors

When running search_retriever.py,
A browser is opened and it logins automatically.
A few seconds after logging in, the program prompts me to press enter to continue.
After pressing enter, the browser loads the linked job search page, and then closes itself.

Traceback (most recent call last):
  File "LinkedIn-Job-Scraper/search_retriever.py", line 24, in <module>
    all_results = job_searcher.get_jobs()
  File "LinkedIn-Job-Scraper/fetch.py", line 62, in get_jobs
    raise Exception('Status code {} for search\nText: {}'.format(results.status_code, results.text))
Exception: Status code 400 for search

Would you mind helping me with this please? Thank you.

Prevent adding company to employee_counts when last recorded time is less than X days

When there's too many job postings from the same company at the time of job searching, that company will be added multiple times when executing details retriever.

  1. There should be a check to prevent adding it again if the time is too short, or
  2. We could use a separate script file to remove duplicated data and reorder the primary key, with time (e.g. in days) as the parameter. This should be only executed after everything's done since it's expensive if executed every time a data is received.

See screenshot below:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.