[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

scrape javascript inside HTML file

cit403

6/24/2006 3:49:00 PM

What I want to do is take an HTML page and parse data out of the
javascript in it.
Trying to pull all *.mov links. Can this be done with just
rubyfulsoup? or make the javascript into a string and use something
else ? please help a newbie

Example of javascript below:

<script language="javascript">

function getRandomNum(lbound, ubound)
{
return (Math.floor(Math.random() * (ubound - lbound) + lbound));
}

var mydir="/00/30/";
var cliparr = new Array();


cliparr[0] = new Array();
cliparr[0]["clipid"] = "/mov/clip/00/30/soccer221.mov";
cliparr[0]["clipgif"] = "/images/art/soccer_ball.gif";
cliparr[0]["clipalt"] = "goal clip";
cliparr[0]["duration"] = "25";
cliparr[0]["directory"] = "/00/30";

</script>}