modify scripts
This commit is contained in:
@ -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} ")
|
||||
|
||||
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user