@URLs = ("http://hotbot.lycos.com/?MT=%s&SM=MC&DV=0&LG=any&DC=10&DE=2&BT=L", "http://hotbot.lycos.com/?MT=%s&DI=10&RPN=2&SQ=1&BT=L", "http://hotbot.lycos.com/?MT=%s&DI=10&OSI=10&RPN=3&SQ=1&TR=198812&BT=L", "http://hotbot.lycos.com/?MT=%s&II=10&DI=10&OSI=10&RPN=4&SQ=1&TR=198812&BT=L", "http://hotbot.lycos.com/?MT=%s&II=20&DI=10&OSI=10&RPN=5&SQ=1&TR=198812&BT=L", "http://hotbot.lycos.com/?MT=%s&II=30&DI=10&OSI=10&RPN=6&SQ=1&TR=198812&BT=L"); sub getpage { my($page, $search) = @_; $page--; return $SearchStat::E_RANGE if($page<0 || $page>$#URLs); $url = sprintf($URLs[$page], $search); $page = &fetch($url); return $SearchStat::E_NOTFOUND if $page == $SearchStat::E_NOTFOUND; @urls = (); return E_RANGE if $page =~ m!Sorry, no matches were found containing .*!is; while($page =~ m![0-9]+\.[^<]*?.*?!is) { my $url = $1; if($url =~ m/director.asp/) { $url =~ m!target=(.*?)&!is; $url = &unurlize($1); } $page =~ s![0-9]+\.[^<]*?.*?!!is; @urls=(@urls, $url); } return \@urls; } $valid = 1; 1;