Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Data retrieval

From: gisle:dankel:no at: 30-Jan-2004 14:10

Hi fellow rebols, I'm writing a script to collect data from various web pages and send the results in an email. Most web pages are ok but a few cause some problems. Here's an example: This page allows you to place bets on various topics. I want to extract this kind of information, but the links trigger javascript functions so there appears to be no direct URLs to the resulting pages. I figure I need to open an HTTP port and post whatever the javascript function sends myself. Here's an example of a javascript function call in a link: <a href="#" onClick="javascript:trade(88190);return false;">Trade This Now!</a> And here's the trade function: function trade(conID) { document.POSTGSX.request_operation.value = "trade"; document.POSTGSX.request_type.value = "action"; document.POSTGSX.selConID.value = conID; document.POSTGSX.location.value = "TradeCentre"; document.POSTGSX.submit(); } I don't know much about javascript and HTTP post. From what I can gather I need to send the same information to the server as the submit() function above, but I have absolutely no idea of what information is sent or how to send it. Also, how do I receive the result? Can I open an http port to achieve this? Any help greatly appreciated! Cheers, Gisle