================== downloadquran.sim ================== This is a basic for downloading file from the Internet this file download all the audio version of the HOLY QURAN into your music folder .. note:: the quran is over 800MB in size but this demo is just used to download the last 30 chapters. To download all the chapter just change the value of the QURAN_START_CHAPTER to 1 then it will download from chapter 114 (An-Nas) to chapter 1 (Al-Fathiah) in decending order The List of chapters are below the code to set the params if you set QURAN_START_CHAPTER to 1 and QURAN_END_CHAPTER to 114 then it will download all the chapters but if you want to download the last 30 chapter you can check the chapter index at the end of this file that means from surat Al-Buruj (085) to surat An-Nas (114) QURAN_START_CHAPTER will be 085 and QURAN_END_CHAPTER will be 114 The website server we are downloading from is `Server6 MP3 Quran`_ and the website is `MP3 Quran`_ we did a check on the index because some of the file url begins with * 0 i.e the numbers less than 100 zero is pre-pended to it e.g **https://server6.mp3quran.net/thubti/098.mp3** so we use this small check .. code-block:: simple if (a < 100) a = "0"+a end so for number less than 100 we have 0 pre-pended to it e.g ``85 becomes "085"`` :copyright: 2018-2019, Azeez Adewale :license: MIT License Copyright (c) 2018 simple :author: Azeez Adewale :date: 05 July 2018 :filename: downloadquran.sim The list below is in ascending order * 001 Al-Fatihah * 002 Al-Baqarah * 003 Al-Imran * 004 An-Nisa' * 005 Al-Ma'idah * 006 Al-An'am * 007 Al-A'raf * 008 Al-Anfal * 09 At-Taubah * 010 Yunus * 011 Hood * 012 Yusuf * 013 Ar-Ra'd * 014 Ibrahim * 015 Al-Hijr * 016 An-Nahl * 017 Al-Isra * 018 Al-Kahf * 019 Maryam * 020 Ta­Ha * 021 Al-Anbiya' * 022 Al-Hajj * 023 Al-Mu'minun * 024 An-Nur * 025 Al-Furqan * 026 Ash-Shu'ara' * 027 An-Naml * 028 Al-Qasas * 029 Al-'Ankabut * 30 Ar­Room * 031 Luqman * 032 As­Sajdah * 033 Al­Ahzab * 034 Saba' * 035 Fatir * 036 Ya­Sin * 037 As-Saffat * 038 Sad * 039 Az-Zumar * 040 Ghafir * 041 Fussilat * 042 Ash-Shura * 043 Az-Zukhruf * 044 Ad-Dukhan * 045 Al-Jathiya * 046 Al-Ahqaf * 047 Muhammad * 048 Al-Fath * 049 Al-Hujurat * 050 Qaf * 051 Az-Zariyat * 052 At-Tur * 053 An-Najm * 054 Al-Qamar * 055 Ar-Rahman * 056 Al-Waqi'ah * 057 Al-Hadid * 058 Al-Mujadilah * 059 Al-Hashr * 060 Al-Mumtahinah * 061 As-Saff * 062 Al-Jumu'ah * 063 Al-Munafiqun * 064 At-Taghabun * 065 At-Talaq * 066 At-Tahrim * 067 Al-Mulk * 068 Al-Qalam * 069 Al-Haqqah * 070 Al-Ma'arij * 071 Nooh * 072 Al-Jinn * 073 Al-Muzzammil * 074 Al-Muddaththir * 075 Al-Qiyamah * 076 Al-Insan * 077 Al-Mursalat * 078 An-Naba' * 079 An-Nazi'at * 080 'Abasa * 081 At-Takwir * 082 Al-Infitar * 083 Al-Mutaffifin * 084 Al-Inshiqaq * 085 Al-Buruj * 086 At-Tariq * 087 Al-A'la * 088 Al-Ghashiyah * 089 Al-Fajr * 090 Al-Balad * 091 Ash-Shams * 092 Al-Lail * 093 Ad-Duha * 094 Ash-Sharh * 095 At-Tin * 096 Al-' Alaq * 097 Al-Qadr * 098 Al-Baiyinah * 099 Az-Zalzalah * 100 Al-'Adiyat * 101 Al-Qari'ah * 102 At-Takathur * 103 Al-'Asr * 104 Al-Humazah * 105 Al-Fil * 106 Quraish * 107 Al-Ma'un * 108 Al-Kauthar * 109 Al-Kafirun * 110 An-Nasr * 111 Al-Masad * 112 Al-Ikhlas * 113 Al-Falaq * 114 An-Nas .. _Server6 MP3 Quran: https://server6.mp3quran.net .. _MP3 Quran: http://www.mp3quran.net ------ Code ------ .. code-block:: simple call simple.net.Download call simple.io.File block main() display "Download QURAN chapters " + crlf + "Azeez Adewale" + crlf + "March 28 2018" + crlf QURAN_START_CHAPTER = 1 QURAN_END_CHAPTER = 114 SAVE_LOCATION = "~\Music\QURAN" #SAVE_LOCATION = "C:\Users\username\Music\QURAN" for a = QURAN_START_CHAPTER to QURAN_END_CHAPTER if (a < 100) a = "0"+a end display "Downloading chapter "+a +" : " try d = new Download("https://server6.mp3quran.net/thubti/"+a+".mp3") d.saveLocation(SAVE_LOCATION+"/"+a+".mp3") d.execute() display "SUCCESSFULL"+crlf catch display __err__ display "FAILED"+crlf end end