我試圖將我的股票投資組合讀入腳本。以下內容適用於NAB在線交易,但不適用於Bell Direct。試圖wget我的股票投資組合
- 在安裝Export Domain Cookies火狐插件
- 日誌到我的網上經紀人與Firefox
- 域的cookie保存到一個文件(例如,
cookies.txt
) wget --no-check-certificate --load-cookies=cookies.txt -O folio.htm https://...
(組合URL)
- 這個想法是重用瀏覽器的登錄會話。當我嘗試使用Bell Direct時,wget
被重定向到登錄頁面。我與curl
獲得了相同的結果。我錯過了什麼?瀏覽器中是否存儲了cookie中的某些狀態? Bell沒有使用「基本認證」,因爲登錄頁面是用戶名/密碼的表單 - 它不會彈出瀏覽器的內置登錄對話框。
這裏是發生了什麼(在Windows XP下使用Cygwin):
$ wget --server-response --no-check-certificate --load-cookies=cookies-bell.txt -O folio-bell.htm https://www.belldirect.com.au/trade/portfoliomanager/
--2009-12-14 10:52:08-- https://www.belldirect.com.au/trade/portfoliomanager/
Resolving www.belldirect.com.au... 202.164.26.80
Connecting to www.belldirect.com.au|202.164.26.80|:443... connected.
WARNING: cannot verify www.belldirect.com.au's certificate, issued by '/C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Server CA/[email protected]':
Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response...
HTTP/1.1 302 Found
Connection: keep-alive
Date: Sun, 13 Dec 2009 23:52:16 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Location: /account/login.html?redirect=https://www.belldirect.com.au/trade/portfoliomanager/index.html
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 229
Location: /account/login.html?redirect=https://www.belldirect.com.au/trade/portfoliomanager/index.html [following]
...
有沒有機會給我們提供測試/假登錄? –