Last active
August 31, 2019 04:04
-
-
Save lowweihong/8384ae0646888844d81e41f0b82c7c20 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
from bs4 import BeautifulSoup | |
import wget | |
soup = BeautifulSoup(r.text, 'lxml') | |
for node_link in soup.select('tr > td:nth-child(2) > a:nth-child(3)'): | |
url = node_link['href'] | |
if is_downloadable(url): | |
wget.download(url, | |
'./data/' + url.split('&file=')[-1].split('&format')[0] + '.mid') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment