News API consisting various sources from Tanzania.
git clone https://github.com/<username>/news-api.git
cd news-api
py -m venv .venv
- Windows
.venv/scripts/activate
- Bash
source .venv/bin/activate
Make sure you are in the right directory.
- cd scraper
pip install -r requirements.txt
# .env
MONGO_DETAILS=mongodb://127.0.0.1:12707
Sites with spiders available for now.
- ITV (https://itv.co.tz)
- Dar24 (https://dar24.com)
- MillardAyo (https://millardayo.com)
scrapy crawl <spider-name>
Spider names
- ITV - itv
- Dar24 - dar24
- MillardAyo - millardayo
cd api
pip install -r requirements.txt
python main.py
The project will be available at http://127.0.0.1