add counter to 2_dump_details to understand how many new are crawled

This commit is contained in:
Kadir 2024-03-30 19:24:03 +01:00
parent 5720e68547
commit acc67192c9

View file

@ -4,10 +4,11 @@ from tqdm import tqdm
from data_access import Listing
counter = 0
for listing in tqdm(Listing.get_all_listings()):
if listing.path_detail_json().exists():
continue
counter+=1
try:
d = detail_query(listing.identifier)
with open(listing.path_detail_json(), "w") as f:
@ -15,3 +16,5 @@ for listing in tqdm(Listing.get_all_listings()):
except:
print("Failed at: ", listing.identifier)
raise
print('crawled new: ', counter)