diff --git a/README.md b/README.md index 66b9f30..7be05cc 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,14 @@ cd SuperISOUpdater python -m pip install . ``` +### Updating + +To update the package to the latest version, run the following command: + +```sh +python -m pip install --upgrade sisou +``` + ## Usage To use SISOU, follow these steps: diff --git a/modules/updaters/Windows10.py b/modules/updaters/Windows10.py index 6865a17..e52af29 100644 --- a/modules/updaters/Windows10.py +++ b/modules/updaters/Windows10.py @@ -21,7 +21,6 @@ class Windows10(GenericUpdater): Attributes: download_page (requests.Response): The HTTP response containing the download page HTML. soup_download_page (BeautifulSoup): The parsed HTML content of the download page. - soup_main_content (Tag): The main contents of the page. Note: This class inherits from the abstract base class GenericUpdater. @@ -96,13 +95,6 @@ def __init__(self, folder_path: Path, lang: str) -> None: self.download_page.content, features="html.parser" ) - self.soup_main_content: Tag = self.soup_download_page.find( - "main", attrs={"id": "mainContent"} - ) # type: ignore - - if not self.soup_main_content: - raise ConnectionError("Failed to fetch the main content from the webpage") - self.hash: str | None = None @cache @@ -127,7 +119,7 @@ def check_integrity(self) -> bool: @cache def _get_latest_version(self) -> list[str]: - software_download_tag: Tag | None = self.soup_main_content.find("div", attrs={"id": "SoftwareDownload_EditionSelection"}) # type: ignore + software_download_tag: Tag | None = self.soup_download_page.find("div", attrs={"id": "SoftwareDownload_EditionSelection"}) # type: ignore if not software_download_tag: raise VersionNotFoundError( "Could not find the software download section containing version information" diff --git a/modules/utils.py b/modules/utils.py index f3718ee..81c9f8e 100644 --- a/modules/utils.py +++ b/modules/utils.py @@ -54,6 +54,7 @@ def parse_config_from_dict(input_dict: dict): for key, value in input_dict.items(): if isinstance(value, dict): if "enabled" in value and not value["enabled"]: + logging.debug(f"Skipping disabled module {key}") del value continue if "directory" in value: @@ -67,6 +68,7 @@ def parse_config_from_dict(input_dict: dict): elif key == "enabled": continue else: + logging.debug(f"Found key {key}") new_dict[key] = value return new_dict