[問題] scrapy 啟動後 parse 未呼叫到

看板Python作者 (gigigigi)時間3年前 (2020/08/22 14:47), 編輯推噓0(004)
留言4則, 2人參與, 3年前最新討論串1/1
https://github.com/jang0820/scrapy/tree/master/twse_mongo 程式碼 https://sites.google.com/site/zsgititit/home/python-cheng-shi-she-ji/shi-yongscrapy-zhua-qu-tai-gu-zheng-jiao-suo-mei-ri-gu-jia-zi-liao-chu-cun-daomongodb?tmpl=%2Fsystem%2Fapp%2Ftemplates%2Fprint%2F&showPrintDialog=1 我是按照上面網址範例操作 在Mongo內建立資料庫STwStock,新增collection為twse 在twse_mongo資料夾執行指令 scrapy crawl twse 發現資料表沒有新增資料~ 後來發現 parse 函數都還沒跑到 想請問一下可能是什麼原因? 下面是執行後log 訊息 https://pastebin.com/Zk4F0KKJ 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 112.104.29.7 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1598078871.A.A7F.html

08/22 15:02, 3年前 , 1F
我看起來是挺明顯的問題啊
08/22 15:02, 1F

08/22 15:05, 3年前 , 2F
Forbidden by robots.txt
08/22 15:05, 2F

08/22 15:05, 3年前 , 3F
所以。要設為False
08/22 15:05, 3F

08/22 16:50, 3年前 , 4F
可以了~感謝
08/22 16:50, 4F
文章代碼(AID): #1VGB-Nf_ (Python)