|
@@ -1,19 +1,15 @@
|
|
|
from abc import abstractmethod, ABCMeta
|
|
|
|
|
|
from crawler.analysis import parse_urls
|
|
|
-from crawler.constants import RBF, MGO_VISIT
|
|
|
-from crawler.downloader import Downloader
|
|
|
+from crawler.constants import MGO_VISIT
|
|
|
+from crawler.download import Downloader
|
|
|
|
|
|
|
|
|
class JySearchEngine(Downloader, metaclass=ABCMeta):
|
|
|
|
|
|
def __init__(self):
|
|
|
- self.filter_instance = RBF
|
|
|
self.mgo_instance = MGO_VISIT
|
|
|
|
|
|
- def is_exists(self, val):
|
|
|
- return self.filter_instance.is_exists(val)
|
|
|
-
|
|
|
@abstractmethod
|
|
|
def search(self, keyword: str):
|
|
|
raise NotImplementedError
|