I'm trying to write a spider that collects web pages. 

In the LocationChange event, I check the properties of the new
location. For instance:
- Is the new location a URL that is present on a black-list of banned
URL's or domains?
- Is there a robots.txt file for the new location?
- Other properties that would lead to an abort of the request.
- Empty the received data buffer so that the buffer only contains the
contents of the new location (I also use the OnDocData event to add
received data to my buffer)..

In the RequestDone event, I process the collected data. A flag is set
for the client to be deleted when the clean up routine comes by.

I use the RequestDone event because this way I'm sure now other events
can be triggered and it is save to delete the client.

Thanks,

--Merijn

P.S. Would it be more efficient to do things another way?


On 27 Jul 2005 3:48:57 +0100, Maurizio Lotauro <[EMAIL PROTECTED]> wrote:
> On 26-Jul-05 09:31:34 Merijn Terheggen wrote:
> 
> >Yes, I'm using the original client. Also the latest version.
> 
> >Don't you get the same results when you add a LocationChange event
> >handler and set breakpoints in both the LocationChange and the
> >RequestDone event handlers?
> 
> What are you doing in these events?
> 
> 
> Bye, Maurizio.
> 
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to