Created
February 6, 2025 09:11
-
-
Save shdwkl/d8fa905dbe84eb10c83a06f9a24b90f4 to your computer and use it in GitHub Desktop.
Fetch Quran recitiation from mp3quran.net
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Set the download directory | |
| download_dir="quran_downloads" | |
| # Create the download directory if it doesn't exist | |
| mkdir -p "$download_dir" | |
| # Loop through the numbers 1 to 114 | |
| for i in $(seq 1 114); do | |
| # Format the file number with leading zeros | |
| formatted_number=$(printf "%03d" $i) | |
| # Construct the URL | |
| url="https://server9.mp3quran.net/download/qurashi/${formatted_number}.mp3" | |
| # Construct the filename | |
| filename="${download_dir}/${formatted_number}.mp3" | |
| # Download the file asynchronously using wget | |
| wget -q --show-progress -c "$url" -O "$filename" & | |
| done | |
| # Wait for all background processes to finish | |
| wait | |
| echo "Downloads complete." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment