import requests from bs4 import BeautifulSoup #取得網址 res = requests.get('http://sypswiki.dcs.tn.edu.tw/wiki/index.php?title=Python_%E7%AD%86%E8%A8%98') soup= BeautifulSoup(res.text,"lxml") for item in soup.select('.mw-headline'): print(item.text)
進階搜尋