Scrape a website with Meteor


#1

Hey guys, I’m writing a small App for Meteor, but I really got stuck while scraping a website. I use this https://atmospherejs.com/anonyfox/scrape package.

According to the example, I should write this line: (where?!)

websiteData = Scrape.website “http://example.com/article

to get some basic data from the website. However, whenever I put this line and run meteor application, I get the following error:

“Errors prevented startup: while processing files with ecmascript… Unexpected token”.

I bet I use this package in a wrong way. If you could write a small example on how I can scrape basic information from any website, I will be very happy!


#2

I successfully scraped a simple website when I changed the code to the following form Scrape.website(http://…).
However, I need to extract the amount of sugar and salt from the following website ( http://www.codecheck.info/essen/knabbergebaeck/weiteres_knabbergebaeck/ean_8710398603319/id_1343951927/Doritos.pro ), but the package doesn’t extract any numbers.


#3

No idea about the package your using, but I can recommend x-ray if it deosnt work out

https://www.npmjs.com/package/x-ray