diff --git a/u9a9/src/fetch.py b/u9a9/src/fetch.py index 5eb369c..cedd307 100644 --- a/u9a9/src/fetch.py +++ b/u9a9/src/fetch.py @@ -42,6 +42,8 @@ def fetch_list(start_p=1): url = None else: p += 1 + if p % 10 == 0 : + utils.write_to_csv(total_results, target_csv) time.sleep(1) else: logging.warning(f"fetch_list failed. url: {url} ") diff --git a/u9a9/src/scraper.py b/u9a9/src/scraper.py index 2e8110e..0e48f40 100644 --- a/u9a9/src/scraper.py +++ b/u9a9/src/scraper.py @@ -88,6 +88,8 @@ def parse_size(size_text: str) -> float: if unit.lower() == 'mb': return round(value / 1024, 2) + elif unit.lower() == 'kb': + return round(value / 1024 / 1024, 2) elif unit.lower() == 'gb': return round(value, 2) else: