mirror of
https://github.com/cquest/tootbot.git
synced 2025-02-23 10:58:25 +00:00
bug fix
This commit is contained in:
parent
efa0d7aaf6
commit
3cd23eb517
12
tootbot.py
12
tootbot.py
@ -158,7 +158,7 @@ if source[:4] == 'http':
|
|||||||
print(len(d.entries))
|
print(len(d.entries))
|
||||||
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
|
||||||
if id in t:
|
if 'id' in t:
|
||||||
id = t.id
|
id = t.id
|
||||||
else:
|
else:
|
||||||
id = t.title
|
id = t.title
|
||||||
@ -169,7 +169,15 @@ if source[:4] == 'http':
|
|||||||
dt.tm_hour, dt.tm_min, dt.tm_sec)
|
dt.tm_hour, dt.tm_min, dt.tm_sec)
|
||||||
# process only unprocessed tweets less than 1 day old, after delay
|
# process only unprocessed tweets less than 1 day old, after delay
|
||||||
if last is None and age < timedelta(days=days) and age > timedelta(days=delay):
|
if last is None and age < timedelta(days=days) and age > timedelta(days=delay):
|
||||||
c = t.title
|
try:
|
||||||
|
alt = t.summary_detail.value
|
||||||
|
except:
|
||||||
|
alt = None
|
||||||
|
pass
|
||||||
|
|
||||||
|
if 'title' in t:
|
||||||
|
c = t.title
|
||||||
|
|
||||||
if twitter and t.author.lower() != ('(@%s)' % twitter).lower():
|
if twitter and t.author.lower() != ('(@%s)' % twitter).lower():
|
||||||
c = ("RT https://twitter.com/%s\n" % t.author[2:-1]) + c
|
c = ("RT https://twitter.com/%s\n" % t.author[2:-1]) + c
|
||||||
toot_media = []
|
toot_media = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user