Created
March 9, 2018 10:34
-
-
Save akkefa/9f9b4cf6933bdc6a1866fdd3526259a5 to your computer and use it in GitHub Desktop.
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
"""Downloading mp3""" | |
from bs4 import BeautifulSoup | |
import re | |
import requests | |
import urllib | |
from os import system | |
r = requests.get("http://") | |
soup = BeautifulSoup(r.text, "html5lib") | |
for a in soup.findAll('a', href=re.compile('http.*\.mp3')): | |
print(a['href'].replace(" ", "%20")) | |
link = a['href'].replace(" ", "%20") | |
system('wget -c "{}"'.format(link)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment