mirror of
https://github.com/cquest/tootbot.git
synced 2024-11-30 15:21:06 +00:00
use title when no id is available
This commit is contained in:
parent
8c6c279c2b
commit
b163d3e115
|
@ -54,7 +54,11 @@ else:
|
|||
|
||||
for t in reversed(d.entries):
|
||||
# check if this tweet has been processed
|
||||
db.execute('SELECT * FROM tweets WHERE tweet = ? AND twitter = ? and mastodon = ? and instance = ?', (t.id, source, mastodon, instance)) # noqa
|
||||
if id in t:
|
||||
id = t.id
|
||||
else:
|
||||
id = t.title
|
||||
db.execute('SELECT * FROM tweets WHERE tweet = ? AND twitter = ? and mastodon = ? and instance = ?', (id, source, mastodon, instance)) # noqa
|
||||
last = db.fetchone()
|
||||
dt = t.published_parsed
|
||||
age = datetime.now()-datetime(dt.tm_year, dt.tm_mon, dt.tm_mday,
|
||||
|
|
Loading…
Reference in New Issue
Block a user