【发布时间】:2010-01-19 10:07:43
【问题描述】:
我正在尝试将我的股票投资组合读入脚本。以下内容适用于 NAB 在线交易,但不适用于 Bell Direct。
- 安装Export Domain Cookies Firefox 插件
- 使用 Firefox 登录我的在线经纪人
- 将域 cookie 保存到文件中(例如
cookies.txt) -
wget --no-check-certificate --load-cookies=cookies.txt -O folio.htm https://...(作品集网址)
-- 重用浏览器登录会话的想法。当我尝试使用 Bell Direct 时,wget 被重定向到登录页面。我得到与curl 相同的结果。我错过了什么?除了 cookie 之外,浏览器中是否还存储了一些状态? Bell 没有使用“基本身份验证”,因为登录页面是用户名/密码的表单 - 它不会弹出浏览器的内置登录对话框。
以下是发生的情况(在带有 Cygwin 的 Windows XP 下):
$ 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.80Connecting 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/emailAddress=server-certs@thawte.com':Unable to locally verify the issuer's authority.HTTP request sent, awaiting response...HTTP/1.1 302 FoundConnection: keep-aliveDate: Sun, 13 Dec 2009 23:52:16 GMTServer: Microsoft-IIS/6.0X-Powered-By: ASP.NETX-AspNet-Version: 2.0.50727Location: /account/login.html?redirect=https://www.belldirect.com.au/trade/portfoliomanager/index.htmlCache-Control: privateContent-Type: text/html; charset=utf-8
@ 987654343@Location: /account/login.html?redirect=https://www.belldirect.com.au/trade/portfoliomanager/index.html [following]...
【问题讨论】:
-
您有机会向我们提供测试/假登录吗?
标签: http session scripting cookies wget