2

我的 Meteor 应用程序使用 Meteor 路由器进行导航,并使用 Spiderable 插件来获取被搜索引擎索引的页面。Spiderable 调用 phantomjs 获取页面内容。这种方法适用于除主页以外的大多数页面。

   '/': ->
    'home'
  '/otherurl': ->
    'otherpage'

我做了一些调试,发现在spiderable.js中page.evaluate的回调在请求主页的情况下总是返回false

...  
setInterval(function() {
  var ready = page.evaluate(function () {
    if (typeof Meteor !== 'undefined' && typeof(Meteor.status) !== 'undefined' && Meteor.status().connected) {
      Meteor.flush();
      return Meteor._LivedataConnection._allSubscriptionsReady();
    }
    return false;
  });
...

有什么建议么?

4

0 回答 0