[問題] 爬蟲問題..
我想抓台南縣觀光旅遊局的資料..網址如下
http://tour.tainan.gov.tw/action.aspx?season=spring
不過我用lxml 分析tag 的結構都不對.. 程式碼如下
from lxml import html
import urllib2
file = urllib2.urlopen('http://tour.tainan.gov.tw/action.aspx?season=spring')
root = html.parse(file).getroot()
#這邊都抓不到table... 不過我用chrome 去抓過document tree, 有抓到超過100個...
print root.cssselect('table')
不知道我哪邊有做錯了..
求救..
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.120.142.214
推
11/12 11:09, , 1F
11/12 11:09, 1F
推
11/12 13:08, , 2F
11/12 13:08, 2F
→
11/12 20:27, , 3F
11/12 20:27, 3F
→
11/12 20:28, , 4F
11/12 20:28, 4F
→
11/12 20:29, , 5F
11/12 20:29, 5F
Python 近期熱門文章
PTT數位生活區 即時熱門文章
14
26