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
Metadata
Release files for ghanashops-scraper 0.0.11
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 |
|---|---|---|---|---|
| ghanashops-scraper-0.0.11.tar.gz | 5.7 kB | Without provenance | Details for ghanashops-scraper-0.0.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ghanashops_scraper-0.0.11-py3-none-any.whl | Python 3 | none | any | Details for ghanashops_scraper-0.0.11-py3-none-any.whl |
Total release size: 17.0 kB
Release files / ghanashops-scraper-0.0.11.tar.gz
| Download URL | ghanashops-scraper-0.0.11.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de8551fd0f1c07a2a360622cfd0eba9c7aa834d843a18efc11581db8f69d407a
|
|
BLAKE2b-256 checksum How to use checksums |
7939123328c30210be6ba1f41746ef9a831006d5df8ec480d5cce6e64e57ec31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / ghanashops_scraper-0.0.11-py3-none-any.whl
| Download URL | ghanashops_scraper-0.0.11-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
127caffa8ab9ffe76b2dadf33cd149b0305453d86bdc01452e35f66265fec14d
|
|
BLAKE2b-256 checksum How to use checksums |
12202867421305a28b016ef85e0589cd9b508400aecf37abaf5084c248db15e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Security for ghanashops-scraper 0.0.11
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.