我想在这里下载所有头条文章的列表,http://seekingalpha.com/symbol/amzn
但是有一个按钮‘更多’调用Ajax。有没有办法下载完整的文章列表?
我不熟悉javascript或Ajax,所以任何建议都会很有帮助。
下面是按钮的javascript函数。
function portfolioPagination(type, page, direction){
if ($(type + '_show_more')) {
$(type + '_show_more').remove();
$('show-more-preloader').style.display = "";
}
if (page == 0) return;
new Ajax.Updater({success: 'headlines_'+type}, '/account/ajax_headlines_content', {
parameters: { type: type, page: page, slugs: 'amzn', is_symbol_page : true},
insertion: 'bottom',
onComplete: function(){$('show-more-preloader').style.display = "none";}
});
if (window.pageTracker) pageTracker._trackEvent("Portfolio Tracking", 'Pagination', type+" - "+direction);
}发布于 2013-03-09 08:16:18
使用Chrome检查器或Firebug或类似的工具来查看AJAX请求,可能类似于../account/ajax_headlines_content/..并查看该请求的结果。这里有你想要的数据。
--
网址是:http://seekingalpha.com/account/ajax_headlines_content
数据为(表单数据):
type: all
page: 2
slugs: amzn
is_symbol_page: true
_:看起来它也接受$_GET:http://seekingalpha.com/account/ajax_headlines_content?type=all&page=2&slugs=amzn&is_symbol_page=true&_=
https://stackoverflow.com/questions/15305557
复制相似问题