Giter Club home page Giter Club logo

linkedinbot's Introduction

LinkedInBot


This project could be used to scrape LinkedIn job listings based on some keywords and locations.

The project has been set up as a Python class object called LinkedInBot.

To use the bot, you'll need to set up the environment:

pip install -r requirements.txt

The bot has a "run" function that will login, go to the jobs tab, search a keyword string + location, and then scrape the first 8 pages saving the job title, company, location, and job description in a database saved in "data/linkedin_data.db".

EMAIL = "your email"
PASSWORD = "your password"

bot = LinkedInBot()
bot.run(EMAIL, PASSWORD, "Data Scientist", "Canada")

Once you've logged in once, the bot will save the browser cookies for reuse next time. If you wanted to configure your own 'run' function you'd use the following functions:

# log in and save cookies:
bot.login(email=EMAIL, password=PASSWORD)
bot.save_cookie("data/cookies.txt")

# go to jobs page and search:
keywords = "some string"
location = "whatever location"
bot.search_linkedin(keywords, location)
bot.wait()

# get all jobs from sidebar, scroll to each job and scrape info:
jobs = bot.driver.find_elements_by_class_name("occludable-update")
for job in jobs:
    bot.scroll_to(job)
    [position, company, location, details] = bot.get_position_data(job)

    # do whatever you like with the info...

bot.close_session()

Hope this is useful!

linkedinbot's People

Contributors

matanfreedman avatar

Stargazers

Zein Waleed avatar Adam CHEN avatar Sari War avatar Gidoneli avatar Kov avatar  avatar ¯\_(ツ)_/¯ avatar  avatar  avatar Sethu Nguna avatar

Watchers

 avatar

linkedinbot's Issues

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.