|
@@ -9,7 +9,7 @@ class BreadthCrawler(SearchEngine, VisitDomain):
|
|
|
def __init__(self, workers=2, **kwargs):
|
|
|
SearchEngine.__init__(self, **kwargs)
|
|
|
VisitDomain.__init__(self, **kwargs)
|
|
|
- self._workers = workers
|
|
|
+ self._workers = workers if workers < 2 else 2
|
|
|
|
|
|
def start(self):
|
|
|
with ThreadPoolExecutor(max_workers=self._workers) as executor:
|