[問題] 台銀匯率爬蟲問題

作者: f0987654 (skywalker)   2016-06-28 20:10:11
最近想用python練習抓台銀的匯率資料來做一些研究,不過遇到了一些問題
我的目標頁面是這頁的匯率資訊
https://fctc.bot.com.tw/Purchase/SelectCurrencyBank
之前用chrome的開發者工具研究了一下, 正常操作流程會是這樣
step 1. GET https://fctc.bot.com.tw/Purchase/WarningPage
step 2. GET https://fctc.bot.com.tw/Purchase/RequestNewOrder
step 3. POST https://fctc.bot.com.tw/Purchase/SelectCurrencyBank
我嘗試過拿step1, step2 的form 資料(變數__RequestVerificationToken)POST 到step3
也是會一直錯誤,它並不會吐匯率資料出來
想說各位有經驗的大大,請問這要如何處理呢?
感謝
環境:python 2.7.10
套件: requests, urllib, BeautifulSoup
作者: iPhone007 (iPhone007)   2016-06-28 20:54:00

Links booklink

Contact Us: admin [ a t ] ucptt.com