feat: renamed pages
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
71ec309953
commit
5cdd4fb6a9
@ -70,7 +70,7 @@ class CliDownloader:
|
|||||||
genre: str = None,
|
genre: str = None,
|
||||||
process_metadata_anyway: bool = False,
|
process_metadata_anyway: bool = False,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.pages: Downloader = Downloader(exclude_pages=exclude_pages, exclude_shady=exclude_shady)
|
self.downloader: Downloader = Downloader(exclude_pages=exclude_pages, exclude_shady=exclude_shady)
|
||||||
|
|
||||||
self.page_dict: Dict[str, Type[Page]] = dict()
|
self.page_dict: Dict[str, Type[Page]] = dict()
|
||||||
|
|
||||||
@ -159,7 +159,7 @@ class CliDownloader:
|
|||||||
def search(self, query: str):
|
def search(self, query: str):
|
||||||
if re.match(URL_PATTERN, query) is not None:
|
if re.match(URL_PATTERN, query) is not None:
|
||||||
try:
|
try:
|
||||||
page, data_object = self.pages.fetch_url(query)
|
data_object = self.downloader.fetch_url(query)
|
||||||
except UrlNotFoundException as e:
|
except UrlNotFoundException as e:
|
||||||
print(f"{e.url} could not be attributed/parsed to any yet implemented site.\n"
|
print(f"{e.url} could not be attributed/parsed to any yet implemented site.\n"
|
||||||
f"PR appreciated if the site isn't implemented.\n"
|
f"PR appreciated if the site isn't implemented.\n"
|
||||||
@ -213,13 +213,13 @@ class CliDownloader:
|
|||||||
|
|
||||||
parsed_query: Query = self._process_parsed(key_text, query)
|
parsed_query: Query = self._process_parsed(key_text, query)
|
||||||
|
|
||||||
self.set_current_options(self.pages.search(parsed_query))
|
self.set_current_options(self.downloader.search(parsed_query))
|
||||||
self.print_current_options()
|
self.print_current_options()
|
||||||
|
|
||||||
def goto(self, data_object: DatabaseObject):
|
def goto(self, data_object: DatabaseObject):
|
||||||
page: Type[Page]
|
page: Type[Page]
|
||||||
|
|
||||||
self.pages.fetch_details(data_object, stop_at_level=1)
|
self.downloader.fetch_details(data_object, stop_at_level=1)
|
||||||
|
|
||||||
self.set_current_options(GoToResults(data_object.options, max_items_per_page=self.max_displayed_options))
|
self.set_current_options(GoToResults(data_object.options, max_items_per_page=self.max_displayed_options))
|
||||||
|
|
||||||
@ -233,7 +233,7 @@ class CliDownloader:
|
|||||||
_result_map: Dict[DatabaseObject, DownloadResult] = dict()
|
_result_map: Dict[DatabaseObject, DownloadResult] = dict()
|
||||||
|
|
||||||
for database_object in data_objects:
|
for database_object in data_objects:
|
||||||
r = self.pages.download(
|
r = self.downloader.download(
|
||||||
data_object=database_object,
|
data_object=database_object,
|
||||||
genre=self.genre,
|
genre=self.genre,
|
||||||
**kwargs
|
**kwargs
|
||||||
@ -320,7 +320,7 @@ class CliDownloader:
|
|||||||
|
|
||||||
if do_fetch:
|
if do_fetch:
|
||||||
for data_object in selected_objects:
|
for data_object in selected_objects:
|
||||||
self.pages.fetch_details(data_object)
|
self.downloader.fetch_details(data_object)
|
||||||
|
|
||||||
self.print_current_options()
|
self.print_current_options()
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user