well... I'm not sure if this one will always work, it's just a quick and dirty hack - as soon as there is another
) within the url or something, it's bound to break. It will also not work if there is a document.write line above this one.
Let's divide the whole thing into a couple of steps first.
- Get the document.write line
- Get rid of the '+' things
- Only get the actual url, not the rest of that stuff
Well, here goes..
my ($url) = $website =~ m/document\.write\((.+?)\)/;
$url =~ s/'\+'//g;
($url) = $url =~ m/src="(.+?)">/;