mirror of
https://github.com/cquest/tootbot.git
synced 2025-02-23 10:58:25 +00:00
search toot by id or title
This commit is contained in:
parent
3cd23eb517
commit
7af034a479
|
@ -162,7 +162,9 @@ if source[:4] == 'http':
|
|||
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
|
||||
|
||||
db.execute('SELECT * FROM tweets WHERE (tweet = ? or tweet = ?) AND twitter = ? and mastodon = ? and instance = ?', # noqa
|
||||
(id, t.link, source, mastodon, instance))
|
||||
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