Javascript CasperJS和mint.com

Javascript CasperJS和mint.com,javascript,web-scraping,phantomjs,casperjs,Javascript,Web Scraping,Phantomjs,Casperjs,我在mint.com上有一个帐户,我每天都在尝试下载有关我帐户的信息。我还没有找到Mint API,我认为Intuit和Yodlee API不起作用 我想在Mint中获取数据,我正在尝试使用CasperJS(如果有必要的话,可以在Raspberry PI上)。现在,下面的JavaSript将解析https://www.google.com很好,但是https://www.mint.com它只是挂起 var links = []; var casper = require('casper').cr

我在mint.com上有一个帐户,我每天都在尝试下载有关我帐户的信息。我还没有找到Mint API,我认为Intuit和Yodlee API不起作用

我想在Mint中获取数据,我正在尝试使用CasperJS(如果有必要的话,可以在Raspberry PI上)。现在,下面的JavaSript将解析
https://www.google.com
很好,但是
https://www.mint.com
它只是挂起

var links = [];
var casper = require('casper').create();

function getLinks() {
    var links = document.querySelectorAll('a');
    return Array.prototype.map.call(links, function(e) {
        return e.getAttribute('href')
    });
}

casper.start('https://www.mint.com/', function() {

});

casper.then(function() {
    links = this.evaluate(getLinks);
});

casper.run(function() {
    // echo results in some pretty fashion
    this.echo(links.length + ' links found:');
    this.echo(' - ' + links.join('\n - ')).exit();
});

造币厂产量

[info] [phantom] Starting...
[info] [phantom] Running suite: 3 steps
[debug] [phantom] opening url: https://wwws.mint.com/, HTTP GET
[debug] [phantom] Navigation requested: url=https://wwws.mint.com/, type=Other, lock=true, isMainFrame=true
[warning] [phantom] Loading resource failed with status=fail: https://wwws.mint.com/
[debug] [phantom] Successfully injected Casper client-side utilities
[info] [phantom] Step 2/3: done in 181787ms.
[info] [phantom] Step 3/3: done in 181893ms.
[info] [phantom] Done 3 steps in 181981ms
0 links found:
 -

谷歌的输出

[info] [phantom] Starting...
[info] [phantom] Running suite: 4 steps
[debug] [phantom] opening url: http://google.fr/, HTTP GET
[debug] [phantom] Navigation requested: url=http://google.fr/, type=Other, lock=true, isMainFrame=true
[debug] [phantom] Navigation requested: url=http://www.google.fr/, type=Other, lock=true, isMainFrame=true
[debug] [phantom] url changed to "http://www.google.fr/"
[debug] [phantom] Successfully injected Casper client-side utilities
[info] [phantom] Step 2/4 http://www.google.fr/ (HTTP 301)
[info] [remote] attempting to fetch form element from selector: 'form[action="/search"]'
[debug] [remote] Set "q" field value to casperjs
[info] [remote] submitting form to /search, HTTP GET
[info] [phantom] Step 2/4: done in 1901ms.
[debug] [phantom] Navigation requested: url=http://www.google.fr/search?hl=fr&source=hp&q=casperjs&gbv=2, type=FormSubmitted, lock=true, isMainFrame=true
[debug] [phantom] url changed to "http://www.google.fr/search?hl=fr&source=hp&q=casperjs&gbv=2"
[debug] [phantom] Successfully injected Casper client-side utilities
[info] [phantom] Step 3/4 http://www.google.fr/search?hl=fr&source=hp&q=casperjs&gbv=2 (HTTP 301)
[info] [remote] attempting to fetch form element from selector: 'form[action="/search"]'
[debug] [remote] Set "q" field value to phantomjs
[info] [remote] submitting form to /search, HTTP GET
[info] [phantom] Step 3/4: done in 4675ms.
[debug] [phantom] Navigation requested: url=http://www.google.fr/search?q=phantomjs&hl=fr&gbv=2&oq=&gs_l=, type=FormSubmitted, lock=true, isMainFrame=true
[debug] [phantom] url changed to "http://www.google.fr/search?q=phantomjs&hl=fr&gbv=2&oq=&gs_l="
[debug] [phantom] Successfully injected Casper client-side utilities
[info] [phantom] Step 4/4 http://www.google.fr/search?q=phantomjs&hl=fr&gbv=2&oq=&gs_l= (HTTP 301)
[info] [phantom] Step 4/4: done in 6478ms.
[info] [phantom] Done 4 steps in 6552ms
22 links found:
 - /url?q=http://casperjs.org/&sa=U&ei=SLQ6UbawMYOE9QSlooD4Bw&ved=0CBwQFjAA&usg=AFQjCNEivptk0tQ6060ZeJF2ZO7BDHisuQ
 - /url?q=http://casperjs.org/installation.html&sa=U&ei=SLQ6UbawMYOE9QSlooD4Bw&ved=0CB8QqwMoADAA&usg=AFQjCNEgDNPxz-NyxPI-XdGxcMM92VMu1g
 - /url?q=http://casperjs.org/quickstart.html&sa=U&ei=SLQ6UbawMYOE9QSlooD4Bw&ved=0CCAQqwMoATAA&usg=AFQjCNG1J2w6fPKdK_mASYGxFsnAWp21fw
CasperJs——版本为1.0.0-RC4

PhantomJs是为RaspberryPI编译的-> 版本1.7.0


一个简单的wget将下载html,所以我必须没有设置或设置CasperJs错误?其他支持javascript的网站解析得很好,但对于Mint,我什么也没得到?

我认为这是一个拼写错误 日志显示

opening url: https://wwws.mint.com/

您的URL中有WWW吗?

尝试使用其他用户代理–如果银行网站阻止PhantomJS,我不会感到惊讶。您的脚本适用于我最新的master。此外,您可能需要检查您的设备是否支持SSL。这是一个很好的问题!:)