【问题标题】:Meteor Spiderable package is not working with Meteor 0.9.0Meteor Spiderable 软件包不适用于 Meteor 0.9.0
【发布时间】:2014-09-05 08:26:53
【问题描述】:

我已按照安装 phantomjs 和 spiderable 包的所有说明进行操作(通过此视频进行操作:https://www.eventedmind.com/feed/meteor-the-spiderable-package),我可以看到标记显示正常。但是,在 localhost 和已部署的应用程序上,源代码仅显示典型的流星 javascript 文件。它不会将脚本转换为正确的 html。

我检查了 phantomjs 是否已安装在本地和生产服务器上。我已经检查了我的流星应用程序中列出了可蜘蛛的包。如果我将 ?_escaped_fragment_= 添加到 URL,我可以看到 html 源代码是正确的。如果这有什么不同,我正在运行 Meteor 0.9.0。

请到生产现场查看:http://www.theyfind.me/

感谢任何帮助。

【问题讨论】:

  • 当我访问theyfind.me/?_escaped_fragment_= 时一切正常,所以你很好。网络蜘蛛会使用 AJAX 友好的 URL 抓取您的网站,而不是默认的。

标签: javascript meteor phantomjs


【解决方案1】:

如果您有 Meteor 0.9 或更高版本,您必须安装 不含 meteor 的软件包。现在,您必须使用 Meteor add 安装软件包,例如在您的情况下:

蜘蛛式

http://atmospherejs.com/gadicohen/spiderable-remote

meteor add gadicohen:spiderable-remote

幻影

http://atmospherejs.com/gadicohen/phantomjs

meteor add gadicohen:phantomjs

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-28
    • 2016-04-20
    • 1970-01-01
    • 2016-07-16
    • 2016-01-02
    • 2014-06-19
    相关资源
    最近更新 更多