(de)serialization and queuing works now

This commit is contained in:
muskit
2023-08-17 02:28:29 -07:00
parent dd4578708a
commit 3c93ca18c2
10 changed files with 163 additions and 188 deletions
+5 -1
View File
@@ -1,6 +1,7 @@
# TODO: move queue structures and file handling here
import os
import shutil
import traceback
import util
import talenttweet as tt
@@ -55,9 +56,12 @@ class TalentTweetQueue:
if len(tokens) == 0 or tokens[0][0] == '#':
continue
ttweet = tt.TalentTweet.deserialize(line)
# print(f'{ttweet.tweet_id}:\n{ttweet}')
self.ttweets_dict[ttweet.tweet_id] = ttweet
print(f'Found {len(self.finished_user_dates)} scraped accounts and {len(self.ttweets_dict)} tweets in queue.')
except: pass
except:
traceback.print_exc()
pass
# finished ttweets
try:
with open(self.finished_ttweets_path, 'r') as f: