python經過BeautifulSoup獲取網頁上的全部超級連接的代碼

以下內容內容是關於python經過BeautifulSoup獲取網頁上的全部超級連接的內容,應該對碼農有所用。 

from BeautifulSoup import BeautifulSoup
import urllib2
 
content = url.read()
soup = BeautifulSoup(content)
links = soup.findAll("a")  複製代碼
                                                                                                                                          
相關文章
相關標籤/搜索