Skip to content

Commit

Permalink
No need to parse JSON, the library expects the string
Browse files Browse the repository at this point in the history
  • Loading branch information
billbelanger committed Jul 19, 2024
1 parent 966cff5 commit 3aeba3c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'''Main executable file'''

import csv
import json
import logging
import os
import re
Expand Down Expand Up @@ -71,14 +70,14 @@ def bootstrap_whoisit_library() -> None:
if not whoisit.is_bootstrapped():
if os.path.isfile(WHOISIT_BOOTSTRAP_FILE):
with open(WHOISIT_BOOTSTRAP_FILE, "r", encoding=ENCODING) as f:
bootstrap_info = json.load(f)
whoisit.load_bootstrap_data(WHOISIT_BOOTSTRAP_FILE)
boostrap_info = f.read()
whoisit.load_bootstrap_data(boostrap_info)
if not whoisit.is_bootstrapped() or whoisit.bootstrap_is_older_than(days=3):
whoisit.clear_bootstrapping()
whoisit.bootstrap()
bootstrap_info = whoisit.save_bootstrap_data()
with open(WHOISIT_BOOTSTRAP_FILE, "w", encoding=ENCODING) as f:
f.write(json.dumps(bootstrap_info))
f.write(bootstrap_info)


# Adding throttling
Expand Down

0 comments on commit 3aeba3c

Please sign in to comment.