add counter to 2_dump_details to understand how many new are crawled
This commit is contained in:
parent
5720e68547
commit
acc67192c9
1 changed files with 4 additions and 1 deletions
|
|
@ -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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue