-1
我想在站点中找到所有音频文件,如.mp3,.wav,.ogg,.wma等使用Python。 这是我的代码>>使用python查找页面中的所有音频链接
url = urllib.request.urlopen(link)
content = url.read()
soup = BeautifulSoup(content)
links = [a['href'] for a in soup.find_all('a',href=re.compile('http.*\.mp3'))]
print (str(len(links)) + " Audios Found ")
# print (links)
print("\n".join(links))
这只能找到MP3播放链接。 我还想要其他音频链接。
感谢的人@kums。其他方式将也很有帮助.. :) – 2014-09-13 07:39:37