guorouda / crawler4j

Automatically exported from code.google.com/p/crawler4j
0 stars 0 forks source link

CrawlController.start() should take a Crawler object, not a class #237

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I would like to configure my crawler with some settings by a constructor, but 
this is difficult to do, as CrawlController.start() does not accept an object, 
only a class.

Can we please add a version of CrawlController.start() that accepts a crawler 
object?

Original issue reported on code.google.com by apenneba...@42six.com on 16 Sep 2013 at 2:23

GoogleCodeExporter commented 9 years ago
I really second this one.

Original comment by avrah...@gmail.com on 29 Jul 2014 at 1:01

GoogleCodeExporter commented 9 years ago
Our multi threading crawler needs the same crawler object for each thread.

So the best way of doing it is by sending the actual class (and having static 
[class] fields for different needed properties of the class).

We can change this and send a class instance instead by using a good cloning 
library - but that has it's own faults so currently we won't change the 
mechanism.

Original comment by avrah...@gmail.com on 11 Aug 2014 at 11:08