- Add a little sleep
- Do-not republish
This commit is contained in:
parent
2576a4d37c
commit
5740730609
@ -47,12 +47,11 @@ def parse():
|
||||
for entry in f.entries:
|
||||
if key not in parsed or parsed[key] < entry.updated_parsed:
|
||||
print colored('++ new entry %s' % entry.title, 'green')
|
||||
time.sleep(2)
|
||||
xmpp.publish(feed['server'], key, entry)
|
||||
else:
|
||||
print colored('++ update entry %s' % entry.title, 'yellow')
|
||||
|
||||
time.sleep(2)
|
||||
xmpp.publish(feed['server'], key, entry)
|
||||
|
||||
# And we update the last updated date for the feed
|
||||
if(f is not None and hasattr(f, 'updated_parsed')) :
|
||||
parsed[key] = f.updated_parsed
|
||||
|
Loading…
x
Reference in New Issue
Block a user