A python package to scrape data from GhanaWeb
Project description
GhanaWeb Scraper
A simple unofficial python package to scrape data from Ghanaweb. Affiliated to bank-of-ghana-fx-rates
How to install
pip install ghanaweb
Usage
# files will be download to your working directory
from ghanaweb.scraper import GhanaWeb
url = 'https://www.ghanaweb.com/GhanaHomePage/politics/'
# url = 'https://www.ghanaweb.com/GhanaHomePage/health/'
# url = 'https://www.ghanaweb.com/GhanaHomePage/crime/'
# url = 'https://www.ghanaweb.com/GhanaHomePage/regional/'
# url = 'https://www.ghanaweb.com/GhanaHomePage/year-in-review/'
# web = GhanaWeb(url='https://www.ghanaweb.com/GhanaHomePage/politics/')
web = GhanaWeb(url=url)
web.download()
scrape list of articles
from ghanaweb.scraper import GhanaWeb
urls = ['https://www.ghanaweb.com/GhanaHomePage/politics/',
'https://www.ghanaweb.com/GhanaHomePage/health/',
'https://www.ghanaweb.com/GhanaHomePage/crime/',
'https://www.ghanaweb.com/GhanaHomePage/regional/',
'https://www.ghanaweb.com/GhanaHomePage/year-in-review/'
]
for url in urls:
web = GhanaWeb(url=url)
web.download()
BuyMeCoffee
Credits
Theophilus Siameh
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ghanaweb-scraper-0.1.0.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for ghanaweb_scraper-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88777aaa15c2246e303df3707010ff6c32ab4520c816a612548c3d8093d7453c |
|
MD5 | 469326136e624f46a9571a19097a0509 |
|
BLAKE2b-256 | 8bfb6453d49604fbd3a8bfe830bf7cae2284dba518ae3d5942d98e2e867374e4 |