title: How to download all MP3 URL as MP3 from a webpage using Python3?
body: <p>I'm trying to learn Python and I tried to write a code to download all the bible mp3 files from my church website where there's a list of mp3 hyperlinks such as:</p>
  <p>Chapter 1, Chapter 2,3,4,5 and so on... <a href="https://ghalliance.org/resource/bible-reading" rel="noreferrer">Reference link</a></p>
  <p>I managed to get all the mp3 URL links to show on the shell after running my code but I can't seem to be able to download them at all.</p>
  <p>Here's my code</p>
  <pre><code>import requests
  import urllib.request
  import re
  from bs4 import BeautifulSoup
  
  r = requests.get('https://ghalliance.org/resource/bible-reading')
  soup = BeautifulSoup(r.content, 'html.parser')
  
  for a in soup.find_all('a', href=re.compile('http.*\.mp3')):
      print(a['href'])
  </code></pre>
  <p>I did try using wget but I can't seem to get wget to work on my machine running VSCode Python 3.8.1 64-bit or conda 3.7.4... I've checked both conda cmd and cmd and it showed that I had wget in my system, I even manually download the wget.exe to my system32 directory but whenever I tried to run the</p>
  <pre><code>wget.download(url)
  </code></pre>
  <p>I always get an error message or something like wget has no attribute 'download' or whatnot.</p>
  <p>I read a few beginner tutorials on using selenium, wget, beautifulsoup to download simple pictures, etc but I can't seem to incorporate their method to work on this specific problem of mine...cuz I'm still too new to programming in general, so I apologize for asking stupid dumb questions like these.</p>
  <p>But now that I had all my MP3 URL links, so my question is:
  how do I go about downloading them using Python?</p>