better tweets.json cleanup on each run

This commit is contained in:
cquest 2022-11-06 09:31:36 +01:00
parent e453665420
commit d29ac1c8c1

View File

@ -146,7 +146,7 @@ if source[:4] == 'http':
sql.commit()
else:
subprocess.run('rm -f tweets.sjson; twint -u %s -tl --limit 10 --json -o tweets.sjson; jq -s . tweets.sjson > tweets.json' %
subprocess.run('rm -f tweets.*json; twint -u %s -tl --limit 10 --json -o tweets.sjson; jq -s . tweets.sjson > tweets.json' %
(source,), shell=True, capture_output=True)
d = json.load(open('tweets.json','r'))
twitter = source