[go: nahoru, domu]

Skip to content

Price-Hunter is a web app that scrapes similar products on Jumia.com.gh and tonaton.com based on user's search

Notifications You must be signed in to change notification settings

DevFreak-ui/Price-Hunter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This is a Python web project that uses Flask web framework to scrape data from Jumia and Tonaton websites, make comparisons of product before proceeding to purchasing site. The project includes two custom API files (jumia_api.py and tonaton_api.py) that make requests to the two servers, parse the response and retrieve data based on a user-defined search keyword.

Prerequisites

  • Python 3.6
  • Flask 1.1.2
  • Requests library
  • BeautifulSoup4 library 4.9.3

Installation

  1. Clone the repository to your local machine
  2. Navigate to the root directory of the project in your terminal or command prompt.
  3. Run pip install -r requirements.txt to install the required dependencies.

Running the Application

  1. Run export FLASK_APP=main.py on Linux/MacOS or set FLASK_APP=main.py on Windows to set the FLASK_APP environment variable to the name of the main Flask application file.
  2. Run flask run to start the application.
  3. Open your web browser and navigate to http://localhost:5000

APIs

The application uses two APIs to fetch the search results:

Jumia API

The jumia_api.py file defines a jumia function that takes a search term as input and returns a list of dictionaries representing the search results from the Jumia website. Each dictionary contains the following keys:

  • title: The title of the product.
  • price: The price of the product.
  • prod_link: The link to the product page.
  • thumbnail_link: The link to the product image.

Tonaton API

The tonaton_api.py file defines a tonaton function that takes a search term as input and returns a list of dictionaries representing the search results from the Tonaton website. Each dictionary contains the following keys:

  • title: The title of the product.
  • price: The price of the product.
  • location: The location of the seller.
  • prod_link: The link to the product page.
  • thumbnail_link: The link to the product image.

Usage

  1. Enter a search query in the search box and click the "Search" button
  2. The application will retrieve and display up to 10 results each from Jumia and Tonaton websites based on the search query

Authors

Acknowledgments

About

Price-Hunter is a web app that scrapes similar products on Jumia.com.gh and tonaton.com based on user's search

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published