[問題] pyquery 解析 big5 網站發生問題

作者: chan15 (ChaN)   2019-04-30 08:24:22
各位好今天寫爬蟲的時候遇到一個奇怪的問題
抓取與解析使用 python 2 的 urlib2 搭配 pyquery
一模一樣的程式碼在我的 ubuntu server 執行順利
但 centos server 就會中斷
為了抽絲剝繭直接把網頁存成檔案來 parser 的結果一樣
程式碼:
d = pq(response)
titles = d('td.list_proName')
for title in titles:
a = pq(title).find('a:first')
print(a.text())

Links booklink

Contact Us: admin [ a t ] ucptt.com