diff --git a/waybackpy/availability_api.py b/waybackpy/availability_api.py index 5922c4b..11a9716 100644 --- a/waybackpy/availability_api.py +++ b/waybackpy/availability_api.py @@ -33,7 +33,8 @@ class WaybackMachineAvailabilityAPI(object): self.api_call_time_gap = 5 self.JSON: Optional[ResponseJSON] = None - def unix_timestamp_to_wayback_timestamp(self, unix_timestamp: int) -> str: + @staticmethod + def unix_timestamp_to_wayback_timestamp(unix_timestamp: int) -> str: """ Converts Unix time to wayback Machine timestamp. """ @@ -153,7 +154,8 @@ class WaybackMachineAvailabilityAPI(object): ) return archive_url - def wayback_timestamp(self, **kwargs: int) -> str: + @staticmethod + def wayback_timestamp(**kwargs: int) -> str: """ Prepends zero before the year, month, day, hour and minute so that they are conformable with the YYYYMMDDhhmmss wayback machine timestamp format. diff --git a/waybackpy/cdx_utils.py b/waybackpy/cdx_utils.py index cc5b528..fce6acb 100644 --- a/waybackpy/cdx_utils.py +++ b/waybackpy/cdx_utils.py @@ -98,8 +98,8 @@ def check_collapses(collapses: List[str]) -> bool: "is not following the cdx collapse syntax." ) raise WaybackError(exc_message) - else: - return True + + return True def check_match_type(match_type: Optional[str], url: str) -> bool: diff --git a/waybackpy/save_api.py b/waybackpy/save_api.py index 3afe40b..29d3b11 100644 --- a/waybackpy/save_api.py +++ b/waybackpy/save_api.py @@ -108,7 +108,8 @@ class WaybackMachineSaveAPI(object): return None - def sleep(self, tries: int) -> None: + @staticmethod + def sleep(tries: int) -> None: """ Ensure that the we wait some time before succesive retries so that we don't waste the retries before the page is even captured by the Wayback