Wikipedia text to max message box

Dryleaze's icon

Hi all,

I've been struggling to get my head around using node.js in conjunction with Max; I've been trying to build a patch that is able to aquire the text from a wikipedia page (using the random page feature on their website) and output it into a message box.
So far I have a jWeb object that outputs the url of the webpage it's on, this is then fed into a node.script object. I don't have any experience with JavaScript and I'm still getting my head around the complexities of Max as it is (so I'm very aware that I've bitten off a bit more than I can chew lol).
I have followed a few different tutorials on how to access web data in Max using Node.js but haven't been too successful.

The first and main issue is the fact that every time I input the URL into the node.script I get a console message saying "unhandled message" followed by the URL. I'm mainly not sure how to set up the script in order to recieve a different URL each time then execute the same function. Along with this, I'm struggling to understand how to output messages back into Max from the script.

If anyone is able to help me trouble shoot these ideas or point me in the right direction with this patch that would be really appreciated!!

Cheers!!