I am trying to use anonyfox:scrape mainly because it has the most app installs from what I can see. However, there is not much documentation behind it and I cannot find any posts about this package in specific. I am trying to pull a feed from http://na.leagueoflegends.com/en/rss.xml and I am getting the error below. I know I will probably need to display these somehow in my template/view too, but cannot get that far. How can I pull these feeds in and display them in my app? The feeds will be displayed at /news
While processing files with ecmascript (for target os.windows.x86_32):
server/main.js:9:23: Unexpected token (9:23)
=> Your application has errors. Waiting for file change.
Thanks in advance!
And what does line 9 of
server/main.js look like?
I think you need parentheses (and possibly check that
feedData = Scrape.feed("http://na.leagueoflegends.com/en/rss.xml");
may be what you’re after.
EDIT: To clarify - it looks like the package author is showing examples in coffescript.
That is super helpful, I’ll try that out! How can I get the feed to display in my template (assuming I can pull the feed)
- “Pull” from the client using a
Meteor.call, with a corresponding Method on the server. Requires a timer on the client to pull at regular intervals. Easy to understand, but won’t scale very well.
- Pull from the server and use the low-level pub/sub API to deliver results to the client. Requires similar mechanics to option 2, but scales better (no oplog tailing), but won’t automatically provide a persistent history.