- Set deliver_payload to false

- Add a little timer between the submissions
This commit is contained in:
Jaussoin Timothée 2014-07-11 21:23:59 +02:00
parent 5141a2a85a
commit 2576a4d37c
2 changed files with 5 additions and 2 deletions

View File

@ -49,6 +49,8 @@ def parse():
print colored('++ new entry %s' % entry.title, 'green')
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

View File

@ -60,6 +60,9 @@ class publishx(sleekxmpp.ClientXMPP):
iq['pubsub']['configure']['form'].addField('pubsub#type',
ftype = 'text-single',
value = NS_ATOM)
iq['pubsub']['configure']['form'].addField('pubsub#deliver_payload',
ftype = 'boolean',
value = 0)
iq['pubsub']['configure']['form'].addField('pubsub#description',
ftype = 'text-single',
value = description)
@ -77,7 +80,6 @@ class publishx(sleekxmpp.ClientXMPP):
item = pubsub.Item()
item['id'] = entry.id
#payload = ET.Item()
ent = ET.Element("entry")
ent.set('xmlns', NS_ATOM)
@ -91,7 +93,6 @@ class publishx(sleekxmpp.ClientXMPP):
content = ET.SubElement(ent, "content")
content.set('type', entry.content[0].type)
#document, errors = tidy_document()
content.text = entry.content[0].value
if(hasattr(entry, 'links')):