This is a simple Python-based scraper for extracting Hadith data from sunnah.com.
It scrapes book titles, chapters, hadith, its english translation and the reference and saves the content to structured JSON/CSV files locally.
- Scrapes book metadata, chapters, hadith, english translations, and reference
- Outputs clean, structured JSON/CSV files
- Super simple CLI interface (prompt-based)
- Designed to work smoothly on Windows
- Clone the repo or download the ZIP.
- Make sure you have Python 3.8+ installed.
- Open a terminal or PowerShell in the project folder.
- Install required packages:
pip install -r requirements.txt
- Run the scraper:
python scraper.py
- Follow the prompts.
- The JSON/CSV files will be saved in the
output_files/
folder.
Each run will generate:
book_name.json
/book_name.csv
— list of books in the collection- Individual JSON / CSV files for each book (e.g.,
Sahih Muslim.json
,Sahih Bukhari.csv
, etc.) - All files are saved under the
output_files/
directory
If you found this project helpful and want to support it, feel free to leave a tip:
Bitcoin:
bc1pd8kf8d7up4wkdq78mrjxt2vuzsu5ckg3lqrywe4vxc9pxfj2k9dqc6vuvt
SOL:
JF1u4jfEdfW2F9uQAZZg2ArbsbiErqkVmGeetzDHYGq
EVM:
0x0110D3c55DB3D6A8Daee8c0e98aC314657F6D943
TRON:
TQQfthgodRRmGzEeLzdwfNPqpn2i6AX8Ee
Built with care by Atif
Sourced from sunnah.com (All rights belong to their respective owners)