mirror of
https://github.com/cquest/tootbot.git
synced 2025-02-23 18:58:36 +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
|
id = t.id
|
||||||
else:
|
else:
|
||||||
id = t.title
|
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()
|
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