According to Marco Antonio de Souza:
> I�m having problems with the htdig for indexing my site with javascript. The
> htdig don't index pages that are called by Javascript. I'm trying to config
> the option url_rewrite_rules for solve my problem. I'm using the following
> syntax in htdig.conf.
>
> url_rewrite_rules: openIT('\\(.*\\)',600,435,null,null,'homepage');
> http://www.my.site.gov.br/\\1
>
> for the respective javascript code :
>
> <font size="2" face="Arial"><a href="#" onclick="homepage=openIT
> ('leis_ordinarias/1993/lei_11970.htm',600,435,null,null,'homepage');">
> <b>LEI N� 11.970, DE <br>
>
> but it doesn't working. Where is the problem ?
As was pointed out, these JavaScript snippets are not actual URLs, and
therefore don't even get so far as the url_rewrite_rules processing.
What's more, the JavaScript isn't even in the href parameter of the
"a" tag, but rather in the onclick parameter which htdig never looks at.
However, this script might do the job, or at the very least provide a
starting point for you...
#!/bin/sh
#
# htopenit - external converter for HTML to extract URLs from openIT calls
#
# Usage: htopenit temp-file text/html URL
#
# Actually called as external converter script from htdig...
# external_parsers: text/html->text/html-internal /path/to/htopenit
#
sed -e 's/href="#"//' \
-e "s|('\([^']*\)',600,435,null,null,'homepage');|\"
href=\"http://www.mysite.gov.br/\1|"
--
Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/
Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada)
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
ht://Dig general mailing list: <[EMAIL PROTECTED]>
ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-general