mirror of
https://github.com/bellingcat/tiktok-hashtag-analysis.git
synced 2026-06-12 13:28:30 +03:00
Add total posts to the hashtag_frequencies console printing
This commit is contained in:
@@ -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]:
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user