completed startpage
This commit is contained in:
+9
-2
@@ -88,16 +88,23 @@ if __name__ == "__main__":
|
||||
if cheaper_listings:
|
||||
comparison_results.append(comparison_result)
|
||||
|
||||
break
|
||||
#break
|
||||
|
||||
print("\nFinished comparing! Found " + str(len(comparison_results)) + " possibly cheaper listings")
|
||||
|
||||
now = datetime.now() # current date and time
|
||||
|
||||
duration_compare = datetime.now() - compare_start_timestamp
|
||||
hours, remainder = divmod(duration_compare.total_seconds(), 3600)
|
||||
minutes, seconds = divmod(remainder, 60)
|
||||
duration_compare = str(hours) +"h " + str(minutes) + "m " + str(round(seconds, 2)) + "s"
|
||||
|
||||
exp = exhtml.exporter("./html_out/")
|
||||
|
||||
for comparison in sorted(comparison_results, key=lambda d: d['max_price_delta'], reverse=True):
|
||||
exp.export_comparison(comparison['seller_listing'], comparison['competitor_listings'])
|
||||
|
||||
exp.export_startpage(str(database_lenght), len(comparison), datetime.timestamp(compare_start_timestamp), now.strftime("%m/%d/%Y, %H:%M:%S"))
|
||||
exp.export_startpage(str(database_lenght), len(comparison_results), duration_compare, now.strftime("%m/%d/%Y, %H:%M:%S"))
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user