Skip to content

Akinfiresoye-Victor/Verify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Verify Scraper

A Django web application for scraping reviews, pricing data, and news content from web sources.

Project Overview

This project includes:

  • A Django app named scraper
  • REST API endpoints for scraping reviews, pricing, and news
  • A homepage UI for selecting scraping methods
  • Environment-based database configuration with SQLite fallback for local development

Features

  • POST /scrape/reviews - expected payload: query, source
  • POST /scrape/pricing - expected payload: url
  • POST /scrape/news - expected payload: query
  • Simple frontend served from scraper/templates/scraper/home_page.html

Note: current scraper logic in scraper/handlers.py returns placeholder sample responses.

Requirements

  • Python 3.11+ (project uses Python 3.14 in the current virtual environment)
  • Django
  • Django REST Framework
  • psycopg2-binary (for PostgreSQL support)
  • python-decouple
  • BeautifulSoup4 and lxml (for scraping logic)

Setup

  1. Create and activate the virtual environment:
cd C:\Users\ZENOID\Desktop\Home\home\self_made.project\veritlyscraper
.env\Scripts\Activate.ps1
  1. Install dependencies:
pip install -r requirements.txt
  1. Copy or create .env in the project root.

  2. Configure environment variables in .env.

Example .env

DB_ENGINE=sqlite3
SECRET_KEY=your-secret-key
DB_NAME=veritly
DB_USER=postgres
DB_PASSWORD=your-db-password
DB_HOST=localhost
DB_PORT=5432

Database Configuration

The project supports both SQLite and PostgreSQL via DB_ENGINE.

  • sqlite3 uses the local file db.sqlite3
  • postgres uses the PostgreSQL settings from .env

Local Development

For local development, use:

DB_ENGINE=sqlite3

Migrations

Run the Django migrations:

python manage.py migrate

Run the App

Start the development server:

python manage.py runserver

Open http://127.0.0.1:8000/ in the browser.

API Endpoints

Reviews Scrape

POST /scrape/reviews

Body:

{
  "query": "Acme Corp",
  "source": "Trustpilot"
}

Pricing Scrape

POST /scrape/pricing

Body:

{
  "url": "https://example.com/product"
}

News Scrape

POST /scrape/news

Body:

{
  "query": "technology"
}

Project Structure

  • veritly/ - Django project settings and configurations
  • scraper/ - main Django app with views, serializers, templates, and scraper handlers
  • env/ - Python virtual environment
  • db.sqlite3 - default SQLite database file

Notes

  • The frontend currently uses static assets in scraper/static/
  • Update scraper/handlers.py to implement real scraping behavior
  • Keep .env out of version control (already ignored by .gitignore)

About

A simple multi-method web scraping tool that lets users scrape reviews, product prices, and news articles from any supported site, then stores the extracted data in a PostgreSQL database. It includes a clean UI for choosing what to scrape, entering a target link or search term, and running the scraper with basic anti-bot handling.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages