作者unhumanWu (阿文)
看板Python
標題[問題]爬蟲如何模擬使用者點擊頁數
時間Sat Feb 10 16:54:50 2018
大家好,初學爬蟲
最近需要爬取公路總局的橋樑資料
https://www.thb.gov.tw/sites/ch/modules/riverbridge/riverbridge_list?node=2ce5a277-2810-4171-8b52-1853b3f6f784
第一頁可用get拿到資料
https://imgur.com/RvW8h0g
https://imgur.com/dLhaAWv
https://imgur.com/fkFV3iJ
其他頁數用post拿到資料
用這方法可拿到1~5頁加第6頁(點擊一次的範圍 ex.”1”, “2” “…” etc)
第7頁以後因為需要點擊兩次,不知道該怎麼寫
( “…” + “7” or “…” + “8” etc)
想問一下模擬使用者點擊2次以上該怎麼寫啊?
感恩!
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.136.46.214
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1518252893.A.1A6.html
→ Kazimir: 他不是有一個->箭頭嗎? 02/10 21:20
→ Kazimir: 而且有需要送...嗎? 不能直接送頁數嗎? 02/10 21:21
推 TitanEric: selium 02/10 21:22
→ rrty: selnium 02/10 22:40
→ rrty: selenium 02/10 22:40
推 jn8029: Selenium 02/11 06:13
好喔,感謝大大
※ 編輯: unhumanWu (220.136.38.43), 02/12/2018 08:29:03