X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=robot.tcl;h=c7d85c47a68dfe22d74f029269b06a90de19b5de;hb=8278051059f0aa2849729755d70967d58dddd8a6;hp=9b672cd52968a1164de792fed43818eacd4a45d1;hpb=aff790b94e4679bf6e1b6e181e9dc28ecf1c75ba;p=tclrobot.git diff --git a/robot.tcl b/robot.tcl index 9b672cd..c7d85c4 100755 --- a/robot.tcl +++ b/robot.tcl @@ -1,5 +1,5 @@ #!/usr/bin/tclsh -# $Id: robot.tcl,v 1.12 2001/01/23 14:28:41 adam Exp $ +# $Id: robot.tcl,v 1.13 2001/02/26 22:51:51 adam Exp $ # proc RobotFileNext1 {area lead} { puts "RobotFileNext1 area=$area lead=$lead" @@ -264,6 +264,9 @@ proc RobotHref {url hrefx hostx pathx} { if {[string first { } $href] >= 0} { return 0 } + if {[string length $href] > 256} { + return 0 + } if {[string first {?} $url] >= 0 && [string first {?} $href] >= 0} { return 0 } @@ -757,7 +760,7 @@ set i 0 set l [llength $argv] if {$l < 2} { - puts {tclrobot: usage [-j jobs] [-c count] [-d domain] [url ..]} + puts {tclrobot: usage [-j jobs] [-i idle] [-c count] [-d domain] [url ..]} puts " Example: -c 3 -d '*.dk' http://www.indexdata.dk/" exit 1 } @@ -784,6 +787,12 @@ while {$i < $l} { } lappend domains $dom } + -i* { + set idleTime [string range $arg 2 end] + if {![string length $idleTime]} { + set idleTime [lindex $argv [incr i]] + } + } default { set href $arg if {[RobotHref http://www.indexdata.dk/ href host path]} {