diff --git a/personal/combine/merge_and_backfill.py b/personal/combine/merge_and_backfill.py index 82fe6d6..bee6f47 100644 --- a/personal/combine/merge_and_backfill.py +++ b/personal/combine/merge_and_backfill.py @@ -133,7 +133,8 @@ def query_reddit(ids, reddit, object_type): try: response = reddit.request(method="GET", path=endpoints.API_PATH["info"], params={"id": id_string}) break - except (prawcore.exceptions.ServerError, prawcore.exceptions.RequestException): + except (prawcore.exceptions.ServerError, prawcore.exceptions.RequestException) as err: + log.info(f"No response from reddit api: {err} : {id_string}") time.sleep(2) return response['data']['children'] diff --git a/scripts/find_overlapping_users.py b/scripts/find_overlapping_users.py index d5cabdc..1f4bff6 100644 --- a/scripts/find_overlapping_users.py +++ b/scripts/find_overlapping_users.py @@ -24,7 +24,7 @@ ignored_users_file = "ignored.txt" min_comments_per_sub = 1 output_file_name = "users.txt" require_first_subreddit = False # if true, print users that occur in the first subreddit and any one of the following ones. Otherwise just find the most overlap between all subs -from_date = datetime.strptime("2005-01-01", "%Y-%m-%d") +from_date = datetime.strptime("2024-11-01", "%Y-%m-%d") to_date = datetime.strptime("2030-12-31", "%Y-%m-%d") @@ -119,6 +119,7 @@ if __name__ == "__main__": log.info(f"Finding users from the first subreddit that are in any of the other subreddits") log.info(f"Minimum comments per subreddit set to {min_comments_per_sub}") log.info(f"Outputting to {output_file_name}") + log.info(f"From date {from_date.strftime('%Y-%m-%d')} to date {to_date.strftime('%Y-%m-%d')}") if os.path.exists(ignored_users_file): with open(ignored_users_file) as fh: