A python package to scrape data from Ghana online shops
Project description
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
Outputs
- All outputs will be saved in a
.csvfile. 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
limitingyour 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ghanashops-scraper-0.0.11.tar.gz.
File metadata
- Download URL: ghanashops-scraper-0.0.11.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de8551fd0f1c07a2a360622cfd0eba9c7aa834d843a18efc11581db8f69d407a
|
|
| MD5 |
51e4c580c1774802bd020a2a2157ec65
|
|
| BLAKE2b-256 |
7939123328c30210be6ba1f41746ef9a831006d5df8ec480d5cce6e64e57ec31
|
File details
Details for the file ghanashops_scraper-0.0.11-py3-none-any.whl.
File metadata
- Download URL: ghanashops_scraper-0.0.11-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
127caffa8ab9ffe76b2dadf33cd149b0305453d86bdc01452e35f66265fec14d
|
|
| MD5 |
4ac0e156e5e4dd9e0411d94a45126295
|
|
| BLAKE2b-256 |
12202867421305a28b016ef85e0589cd9b508400aecf37abaf5084c248db15e2
|