如何在MongoDB上存储通过casperjs抓取的数据?我在 casperjs 中有一个脚本,可以从百万个网站抓取数据并将每个网站的内容存储在一个单独的文件夹中。我现在意识到我应该将数据保存到MongoDB上,以便轻松执行CRUD操作。请帮忙。
db.webpages.insert({"renderedHTML": "<escaped string/text>"})
您可能希望存储其他元数据(例如抓取的时间戳、URL 等)