mirror of
https://github.com/Watchful1/PushshiftDumps.git
synced 2025-07-25 15:45:19 -04:00
Fix last month of year
This commit is contained in:
parent
82966bf7f6
commit
6114afb53f
3 changed files with 8 additions and 7 deletions
|
@ -60,6 +60,9 @@ if __name__ == "__main__":
|
||||||
total_objects = 0
|
total_objects = 0
|
||||||
total_bytes = 0
|
total_bytes = 0
|
||||||
minute_iterator = month
|
minute_iterator = month
|
||||||
|
if month == 12:
|
||||||
|
end_time = month.replace(year=month.year + 1, month=1)
|
||||||
|
else:
|
||||||
end_time = month.replace(month=month.month + 1)
|
end_time = month.replace(month=month.month + 1)
|
||||||
while minute_iterator < end_time:
|
while minute_iterator < end_time:
|
||||||
minute_file_path = os.path.join(args.input, args.type, minute_iterator.strftime('%y-%m-%d'), f"{prefix}_{minute_iterator.strftime('%y-%m-%d_%H-%M')}.zst")
|
minute_file_path = os.path.join(args.input, args.type, minute_iterator.strftime('%y-%m-%d'), f"{prefix}_{minute_iterator.strftime('%y-%m-%d_%H-%M')}.zst")
|
||||||
|
|
|
@ -8,8 +8,8 @@ log = discord_logging.init_logging()
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
day = None
|
day = None
|
||||||
day_comments = 0
|
day_comments = 0
|
||||||
for comment in utils.read_obj_zst(r"\\MYCLOUDPR4100\Public\reddit_final\wallstreetbets_comments.zst"):
|
for comment in utils.read_obj_zst(r"C:\Users\greg\Desktop\Drive\pushshift\haley0530\chatbots_submissions.zst"):
|
||||||
created_day = datetime.utcfromtimestamp(int(comment['created_utc'])).strftime("%m/%d/%y")
|
created_day = datetime.utcfromtimestamp(int(comment['created_utc'])).strftime("%y-%m-%d")
|
||||||
if day is None:
|
if day is None:
|
||||||
day = created_day
|
day = created_day
|
||||||
if day != created_day:
|
if day != created_day:
|
||||||
|
|
|
@ -7,10 +7,8 @@ import zstandard
|
||||||
import json
|
import json
|
||||||
|
|
||||||
input_files = [
|
input_files = [
|
||||||
r"\\MYCLOUDPR4100\Public\reddit\subreddits\PersonalFinanceCanada_comments.zst",
|
r"\\MYCLOUDPR4100\Public\reddit\subreddits\srilanka_comments.zst",
|
||||||
r"\\MYCLOUDPR4100\Public\reddit\subreddits\hacking_comments.zst",
|
r"\\MYCLOUDPR4100\Public\reddit\subreddits\Warthunder_comments.zst",
|
||||||
r"\\MYCLOUDPR4100\Public\reddit\subreddits\alberta_comments.zst",
|
|
||||||
r"\\MYCLOUDPR4100\Public\reddit\subreddits\GothGirls_comments.zst",
|
|
||||||
]
|
]
|
||||||
ignored_users = ['[deleted]', 'automoderator']
|
ignored_users = ['[deleted]', 'automoderator']
|
||||||
min_comments_per_sub = 1
|
min_comments_per_sub = 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue