mirror of
https://github.com/cquest/tootbot.git
synced 2024-11-23 20:11:06 +00:00
avoid re-entrance problems
This commit is contained in:
parent
fc049bae16
commit
a858cd4608
|
@ -146,6 +146,11 @@ if source[:4] == 'http':
|
|||
sql.commit()
|
||||
|
||||
else:
|
||||
try:
|
||||
os.mkdir(source)
|
||||
except:
|
||||
pass
|
||||
os.chdir(source)
|
||||
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'))
|
||||
|
|
Loading…
Reference in New Issue
Block a user