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/yourusername/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.0.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.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: linkedin_games_scraper-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 54620769f3513da6230fe0274c2ec12e87596c66184c973fd06da1aa5563b71f
MD5 394d6fdf8ef311649a99fa85eae633d4
BLAKE2b-256 97601d8e54aba04e6b3784cfb621fd0e4b7a8bc53fe2fa7db9cd3b5f8fbc8608

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for linkedin_games_scraper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f0db6d5886e9f23aa6422e52759cdaf5ae904da4ee102684ed7daec73cfdd22
MD5 4a562661ad6f67c74da9ce20dcdbd837
BLAKE2b-256 77030637c5b321f1789bde0ad02e5a43e9faa3799015bded6e973bda05c8ef1d

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