[問題] 爬蟲 論壇回覆

看板Python作者 (別理我)時間6年前 (2018/02/02 14:03), 編輯推噓2(204)
留言6則, 5人參與, 6年前最新討論串1/1
想從伊莉論壇練習爬蟲回覆 已用session , post 登入帳號 但到了要回文時 payload2= { "message":"回覆內容", "posttime":"1517549025", "formhash":"b74b43a6", "subject":"" } 得到這一串 <?xml version="1.0" encoding="utf-8"?> <root><![CDATA[抱歉,您的請求來路不正確或表單驗證串不符,無法提交<script type="text/javascript" reload="1">if(typeof errorhandle_fastpost=='function') {errorhandle_fastpost('抱歉,您的請求來路不正確或表單驗證串不符,無法提交', {});}</script>]]></root> 應該是沒有驗證碼 我猜想可能是 posttime 時間點不對 或是其他原因 請問該如何解決 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.137.135.32 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1517551435.A.291.html

02/02 14:11, 6年前 , 1F
應該要看一下Header要傳什麼過去.有可能是Cookie or User
02/02 14:11, 1F

02/02 14:14, 6年前 , 2F
-Agent, Refferal ..., 每個去Try一下就知道了
02/02 14:14, 2F

02/02 14:38, 6年前 , 3F
前陣子某篇爬蟲文有推文說寫過伊莉爬蟲, 不如直接問他?
02/02 14:38, 3F

02/04 18:29, 6年前 , 4F
csrf?
02/04 18:29, 4F

02/05 16:25, 6年前 , 5F
先用瀏覽器的開發工具去看有那些參數
02/05 16:25, 5F

02/09 12:28, 6年前 , 6F
最後是搭配selenium解決的!
02/09 12:28, 6F
文章代碼(AID): #1QS_zBAH (Python)