in reply to Re: RobotUA not working
in thread RobotUA not working

Wow PN5 it prints HTML now, thanks alot! Is there any particular reason why i cant set my delay so that i requests faster than a minute. i have it set for 10 seconds
$ua->delay(10/60)
but it still takes a minute to print. Also when i try to parse content using HTML::Parser it gives me this
HTML::Parser=HASH(0x826f6b4)
i tried putting ->parse at the end of the code like this
$p->parse($content)->parse;
and leaving the second parse off, but i still get the Hash(.....). I looked at CPAN's docs, but they all seem to say that i am using it correctly.
Thanks

Replies are listed 'Best First'.
Re: Re: Re: RobotUA not working
by Prior Nacre V (Hermit) on Mar 07, 2004 at 06:14 UTC

    I'm glad it's working.

    Regarding the delay, the reason is simply etiquette; the same applies to honouring the requests in the robots.txt file.

    PN5

Re: Re: Re: RobotUA not working
by Prior Nacre V (Hermit) on Mar 07, 2004 at 18:45 UTC

    Second Reply - Following Update

    I'm detecting either a misunderstanding or a lack of knowledge regarding the way Perl represents object references. This may help:

    my $q = CGI->new; print $q; # outputs CGI=HASH(0xhhhhhhh) my $fh = IO::File->new; print $fh; # outputs IO::File=GLOB(0xhhhhhhh) # Format is: # <module-name>=<blessed-reference-type>(0x<hex-memory-location>)

    Most HTML::Parser methods return an HTML::Parser object. This is what you are outputting. You'll need to supply code in order for me to supply more information :-)

    I haven't used this module previously so I wrote a test script to see what's going on. I've posted it after the 'Read more ...', hopefully you'll find something useful there.

    The HTML::Parser documentation includes about half-a-dozen example (working) scripts.

    PN5

      Thanks PN5 before i read this i did find some code similar to yours, now it works, thanks for replying though, I did post another Parser question in Seekers of Perl wisdom regarding word combining.
      Thanks