ghanashops-scraper 0.0.11

Creator: rpa-with-ash

Last updated:

Add to Cart

Description:

ghanashopsscraper 0.0.11

Ghana Online Shops Scraper
A simple unofficial python package to scrape data from
Tonaton,
JumiaGH.
Affiliated to Bank of Ghana Fx Rates
GhanaNews-Scraper.
How to install
pip install ghanashops-scraper

Example Google Colab Notebook
Click Here:
Outputs

All outputs will be saved in a .csv file. Other file formats not yet supported.
Format:

["product_description", "price", "location", "photo", "page_url"]




Usage

Scrape shop data from Tonaton
Example of search queries: cars, laptops, phones, vehicles, rent, houses, tablets, shoes, refrigerator

from tonaton.scraper import Tonaton

search_query = "iphones"
tonaton = Tonaton(query=search_query)
tonaton.download()

Limiting the number of pages to scrape.

Note: some pages may take longer depending on the count. Recommend limiting your pages.

from tonaton.scraper import Tonaton

search_query = "laptops"
tonaton = Tonaton(query=search_query, limit_pages=10)
tonaton.download()

Using Asyncio

DO NOT USE IN JUPYTER NOTEBOOKS OR GOOGLE COLAB. OTHER WAYS ARE ACCEPTED

import asyncio
from tonaton.scrapy import Tonaton

search_query = "buses"
tonaton = Tonaton(query=search_query, limit_pages=10)

if __name__ == '__main__':
asyncio.run(tonaton.get_data())
tonaton.download()

BuyMeCoffee

Credits

Theophilus Siameh
Follow me on Twitter

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.