Skip to main content

A package to solve LinkedIn games by extracting solutions

Project description

LinkedIn Games Scraper

A Python package that automatically solves LinkedIn games by extracting solutions from network requests.

Features

  • Solves all LinkedIn daily games:
    • Pinpoint
    • CrossClimb
    • Queens
    • Zip
    • Tango
  • Headless operation (no browser window required)
  • Saves solutions to JSON files
  • Simple API for integration into other projects

Installation

pip install linkedin_games_scraper

Requirements

  • Python 3.6+
  • Chrome browser installed
  • ChromeDriver compatible with your Chrome version

Usage

Command Line

After installation, you can run the scraper from the command line:

linkedin-games-solver

This will solve all LinkedIn games and save the results to a JSON file in the results directory.

Python API

Solving All Games

from linkedin_games_scraper import GameSolver

# Create a solver instance
solver = GameSolver(headless=True)

# Solve all games
results = solver.solve_all_games()

# Results will contain solutions for all games
print(results)

Solving a Specific Game

from linkedin_games_scraper import GameSolver

# Create a solver instance
solver = GameSolver(headless=True)

try:
    # Solve Pinpoint
    pinpoint_solution = solver.solve_pinpoint()
    print(f"Pinpoint solution: {pinpoint_solution}")

    # Solve CrossClimb
    crossclimb_solution = solver.solve_crossclimb()
    print(f"CrossClimb solution: {crossclimb_solution}")

    # Other games: solve_zip(), solve_queens(), solve_tango()
finally:
    # Always clean up to close the browser and save results
    results_file = solver.cleanup()
    print(f"Results saved to {results_file}")

Customising the Results Directory

from linkedin_games_scraper import GameSolver

# Specify a custom results directory
solver = GameSolver(headless=True, results_dir="my_solutions")

# Solve games...
solver.solve_all_games()

How It Works

The package uses Selenium with the selenium-wire extension to:

  1. Navigate to the LinkedIn game page
  2. Wait for the game to load
  3. Click the start button
  4. Intercept network requests containing game solutions
  5. Extract and format the solution data
  6. Save the results to a JSON file

Development

Setup Development Environment

# Clone the repository
git clone https://github.com/sebtheo/linkedin-games-scraper.git
cd linkedin-games-scraper

# Install development dependencies
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install

Using the Makefile

The project includes a Makefile with common development tasks:

# Install development dependencies
make dev-install

# Run linting
make lint

# Format code
make format

# Run tests
make test

# Build package
make build

# Clean build artifacts
make clean

# Run the package
make run

Local Testing

To run the package locally without installing:

# Run directly
python run.py

# Or use the module
python -m linkedin_games_scraper

Troubleshooting

  • Browser crashes or fails to start: Ensure you have the latest version of Chrome and ChromeDriver installed.
  • No solutions found: LinkedIn may have changed their API. Please check for updates to this package.
  • Slow performance: Try setting headless=False to see what's happening in the browser.

Licence

This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linkedin_games_scraper-0.1.1.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linkedin_games_scraper-0.1.1-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file linkedin_games_scraper-0.1.1.tar.gz.

File metadata

  • Download URL: linkedin_games_scraper-0.1.1.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for linkedin_games_scraper-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b8fb85d03ff6dfe62177de2d6d49460b571b4bc4e8bcd3106abea70190908031
MD5 aee8fd75ab2b587fb93a5a19a1845ef7
BLAKE2b-256 2b29d74a2f30bfd685c123617d3f9f5fb6976d37573732b23c2e69c2bd0b5658

See more details on using hashes here.

File details

Details for the file linkedin_games_scraper-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for linkedin_games_scraper-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 acf751a1376b83785b593ae2236f51f9cabd0c76ff501110f73cd2c2acfe9327
MD5 e3c06c5d6f8d9f0eb3e67f0f4f67e299
BLAKE2b-256 142da909428712fec07d801d6e42637ad6ef38308113bc7126345298bb64f660

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page