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
-
Clone this repository from GitHub.
-
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
- Configure your scraping tasks by editing the configuration files in the
configdirectory. - Run the scraper using the command:
poetry run python main.py - The scraped data will be saved in the
outputdirectory.
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
Codebaseclass 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
pytestto ensure everything is working correctly.
Tasklist to complete before Wallaby
- fix relative/absolute import problem. don't rely on
-m - 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| web_raider-0.0.2.tar.gz | 16.8 kB | Without provenance | Details for web_raider-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| web_raider-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for web_raider-0.0.2-py3-none-any.whl |
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
|
Security for web-raider 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.