Skip to main content

web-raider

Overview

Web Raider is a powerful web scraping and data extraction tool designed to help you gather information from various websites efficiently. It provides a simple interface to configure and run web scraping tasks, making it easy to collect and process data for your projects.

Setup Guide

  1. Clone this repository from GitHub.

  2. Open terminal (after redirecting yourself to the repo) and run the following commands:

    • pip install poetry (don't create venv through python. does not go well.)
    • poetry lock (creates venv for you)
    • poetry install

Setup for Raider Backend

Run pip install -e . from the git root directory. Raider Backend will call Web Raider using pipeline_main(user_query: str) from web_raider/pipeline.py.

Usage

  1. Configure your scraping tasks by editing the configuration files in the config directory.
  2. Run the scraper using the command: poetry run python main.py
  3. The scraped data will be saved in the output directory.

How the Repository Works

  • web-raider/: Contains the core logic of the application.
    • article.py: Handles the extraction of codebase URLs from articles.
    • codebase.py: Defines the Codebase class and its subclasses for different code hosting platforms.
    • connection_manager.py: Manages WebSocket connections and message buffering.
    • evaluate.py: Evaluates codebases based on a query.
    • model_calls.py: Handles calls to external models for query simplification, relevance, scoring, and ranking.
    • pipeline.py: Defines the main pipeline for processing user queries.
    • search.py: Handles Google search queries and filters results.
    • shortlist.py: Shortlists codebases based on a query.
    • url_classifier.py: Classifies URLs into different categories.
    • utils.py: Contains utility functions.
    • constants.py: Defines constants used across the application.
    • init.py: Initializes the web-raider package.
  • assets/: Contains auxiliary files and configurations.
    • key_import.py: Handles the import of API keys.
    • prompts.py: Defines various prompts used in model calls.
    • init.py: Initializes the assets package.
  • tests/: Contains unit tests for the application. Run the tests using pytest to ensure everything is working correctly.

Tasklist to complete before Wallaby

  1. fix relative/absolute import problem. don't rely on -m
  2. need to be able to run the code from any directory

Future Implementations/Improvements

  • Use Machine Learning Classification Algorithms to classify types of URLs to their type (Codebase, Article, Forum)
  • Find a way to handle Forum URLs (right now they are not processed)
  • Find a way to scrape code directly from Articles and Forum URLs (right now only links are scraped)
  • Properly implement main query breakdown instead of just whacking LLM

Metadata

Release files for web-raider 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for web-raider 0.0.2
File Size Uploaded
web_raider-0.0.2.tar.gz 16.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for web-raider 0.0.2
File Interpreter ABI Platform
web_raider-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 36.6 kB

Release files / web_raider-0.0.2.tar.gz

Download URL web_raider-0.0.2.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fa90b4551240d4c972fba1a1844fe03ba70d6beda81b4f515020cb089caaad73
BLAKE2b-256 checksum
How to use checksums
43a3d6f71a5fa1f880d0aeae8e674e0cf39f3e880d68be1720d7d7ab95d83c83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.9.13 Windows/10

Release files / web_raider-0.0.2-py3-none-any.whl

Download URL web_raider-0.0.2-py3-none-any.whl
Size 19.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1e612972a07feedf857daff48604dbafd6270f99deeab96eb43f6eda6f8272d
BLAKE2b-256 checksum
How to use checksums
178df148abf9846abdde0bad259665fd409cc446654c1eeedb89b4d3d5079e5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.9.13 Windows/10

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page