node.js - Web Scrape Meteor Pages -
I'm trying to write an application that snaps a meteor's webpage, it is not difficult because the meteor webpage is full initially Well presented in the form of javascript. Maybe there is no way to present the page with scraper in some way?
Maybe it is going to do with the node, if it helps.
Thanks
You can use fastenomes to render webpages This is an example, specially designed for meteor webpages, (from sparrable) to capture your HTML:
var fs = require ('fs'); Var requires child_process = ('child_process'); Console.log ('loading a web page'); Var page = requirement ('webpage'). Create (); Page.open ("http: // localhost: 3000", function (position) {}); Var i = 0; SetInterval (function () {var ready = page.evaluate (function ()} (If (type of meteorite! == 'undefined' & amp; amp; amp; amp; amp; amp; amp; amp; typeof (Meteor. Status!) == 'Undefined' & amp; amp; amp; & amp; amp; Meteor.Status () .connected) {Deps.flush (); Return DDP._All Subscriptions REDI ();} Return False;}) ; Console.log ("ready", ready); if (ready) {var out = page.content; console (out); phantom ext. ();}}, 100); It is in this way, but you can wrap the output and capture it using the 'code' requirement ('child_process'). Exec and stdin . You can run the code with phantomjs script.js and this will give you the HTML of a meteor page.
Comments
Post a Comment