mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Move logging logic to singleton
- Renamed module and class because "conductor" didn't make a lot of sense - Used singleton approach (there's only one stdout after all) - Redesigned progress bars (now with download speed!)
This commit is contained in:
@ -16,7 +16,6 @@ from PFERD.output_dir import Redownload
|
||||
from PFERD.utils import soupify
|
||||
|
||||
from ..authenticators import Authenticator
|
||||
from ..conductor import TerminalConductor
|
||||
from ..config import Config
|
||||
from ..crawler import CrawlerSection, HttpCrawler, anoncritical, arepeat
|
||||
|
||||
@ -533,10 +532,9 @@ class KitIliasCrawler(HttpCrawler):
|
||||
name: str,
|
||||
section: KitIliasCrawlerSection,
|
||||
config: Config,
|
||||
conductor: TerminalConductor,
|
||||
authenticators: Dict[str, Authenticator]
|
||||
):
|
||||
super().__init__(name, section, config, conductor)
|
||||
super().__init__(name, section, config)
|
||||
|
||||
self._shibboleth_login = KitShibbolethLogin(
|
||||
section.auth(authenticators),
|
||||
@ -615,7 +613,7 @@ class KitIliasCrawler(HttpCrawler):
|
||||
await self._download_file(element, element_path)
|
||||
elif element.type == IliasElementType.FORUM:
|
||||
# TODO: Delete
|
||||
self.print(f"Skipping forum [green]{element_path}[/]")
|
||||
print(f"Skipping forum [green]{element_path}[/]")
|
||||
elif element.type == IliasElementType.LINK:
|
||||
await self._download_link(element, element_path)
|
||||
elif element.type == IliasElementType.VIDEO:
|
||||
|
Reference in New Issue
Block a user