
1arryb
User
Mar 10, 2009, 3:19 PM
Post #2 of 2
(316 views)
|
|
Re: [ani.das00] Processing JavaScriptLink by Perl .
[In reply to]
|
Can't Post
|
|
Hi ani.das, If all you need is the raw url so you can fetch it, try pre-processing your link. Perhaps something like:
... if ($url =~ /a href=/) { # It's a link. if ( $url =~ 'JavaScript:openlink' ) { # oops! java script. Parse the url from the argument to openlink(). $url =~ /\('([^']+)'\)/; if ($1) { $url = $1; } else { printf("Can't parse a url from $url\n"); } } } Otherwise, you could try dealing with the javascript. I haven't done any of that, but you might take a look at this thread: http://www.perlmonks.org/?node_id=559996. Cheers, Larry
|