modify scripts

This commit is contained in:
oscarz
2025-06-19 08:56:18 +08:00
parent 39d346e978
commit afe3d2e96e
2 changed files with 4 additions and 0 deletions

View File

@ -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} ")

View File

@ -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: