Skip to content

Instantly share code, notes, and snippets.

View aotantawy's full-sized avatar

Ahmed Osama Tantawy aotantawy

  • Crowd Analyzer
  • Cairo, Egypt
  • 16:07 (UTC +03:00)
  • X @aotantawy
View GitHub Profile
@aotantawy
aotantawy / download-quran-files.py
Last active October 6, 2021 05:50
A web scraping script for downloading quran files from quranbysubject.com
import requests
from bs4 import BeautifulSoup
def removeSpacesFromfileName(fileName):
return fileName.replace(" ","-")
mainURL = "https://quranbysubject.com/categories.php"
downloadURL = "https://quranbysubject.com/categorytext.php"
page = requests.get(mainURL)
soup = BeautifulSoup(page.content, "html.parser")