mirror of
https://github.com/cquest/tootbot.git
synced 2025-05-04 10:03:34 +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):
|
for t in reversed(d.entries):
|
||||||
# check if this tweet has been processed
|
# 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()
|
last = db.fetchone()
|
||||||
dt = t.published_parsed
|
dt = t.published_parsed
|
||||||
age = datetime.now()-datetime(dt.tm_year, dt.tm_mon, dt.tm_mday,
|
age = datetime.now()-datetime(dt.tm_year, dt.tm_mon, dt.tm_mday,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user