diff --git a/tiktok_downloader/file_methods.py b/tiktok_downloader/file_methods.py index 43184fe..e9d4328 100644 --- a/tiktok_downloader/file_methods.py +++ b/tiktok_downloader/file_methods.py @@ -118,7 +118,7 @@ def log_writer(log_data: list): Writes the dictionary to the log file (logs/log.json). """ total = 0 - scraped_summary_dict: dict + scraped_summary_dict: dict = {} for hashtag, (data_type, count) in log_data: if hashtag in scraped_summary_dict: if data_type in scraped_summary_dict[hashtag]: diff --git a/tiktok_downloader/hashtag_frequencies.py b/tiktok_downloader/hashtag_frequencies.py index 5ad3f41..1650f73 100644 --- a/tiktok_downloader/hashtag_frequencies.py +++ b/tiktok_downloader/hashtag_frequencies.py @@ -92,6 +92,7 @@ def print_occurrences(occs): ratio = value / total_posts print("{:<8} {:<15} {:<15} {:<15}".format(row_number, key, value, ratio)) row_number += 1 + print(f"Total posts: {total_posts}") def save_plot(img_folder):