mirror of
https://github.com/cquest/tootbot.git
synced 2024-11-23 20:11:06 +00:00
some debug output to log activity
This commit is contained in:
parent
5a8dabf974
commit
e453665420
|
@ -75,9 +75,13 @@ except:
|
|||
sys.exit(1)
|
||||
|
||||
|
||||
print(source)
|
||||
print("---------------------------")
|
||||
|
||||
if source[:4] == 'http':
|
||||
d = feedparser.parse(source)
|
||||
twitter = None
|
||||
print(len(d.entries))
|
||||
for t in reversed(d.entries):
|
||||
# check if this tweet has been processed
|
||||
if id in t:
|
||||
|
@ -147,6 +151,7 @@ else:
|
|||
d = json.load(open('tweets.json','r'))
|
||||
twitter = source
|
||||
|
||||
print(len(d))
|
||||
for t in reversed(d):
|
||||
c = html.unescape(t['tweet'])
|
||||
# do not toot twitter replies
|
||||
|
@ -249,3 +254,4 @@ else:
|
|||
db.execute("INSERT INTO tweets VALUES ( ? , ? , ? , ? , ? )", (id, toot["id"], source, mastodon, instance))
|
||||
sql.commit()
|
||||
|
||||
print()
|
||||
|
|
Loading…
Reference in New Issue
Block a user