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