2016-01-27から1日間の記事一覧

BeautifulSoupでhtmlをパーズ

(1)とりあえずのリンク抽出 http://www.crummy.com/software/BeautifulSoup/bs4/doc/ from bs4 import BeautifulSoup soup=BeautifulSoup(open("index.html")) #title print(soup.title.string) v=(soup.find_all('a')) for i in v: print(i['href']) (…