- Set deliver_payload to false
- Add a little timer between the submissions
This commit is contained in:
parent
5141a2a85a
commit
2576a4d37c
@ -49,6 +49,8 @@ def parse():
|
|||||||
print colored('++ new entry %s' % entry.title, 'green')
|
print colored('++ new entry %s' % entry.title, 'green')
|
||||||
else:
|
else:
|
||||||
print colored('++ update entry %s' % entry.title, 'yellow')
|
print colored('++ update entry %s' % entry.title, 'yellow')
|
||||||
|
|
||||||
|
time.sleep(2)
|
||||||
xmpp.publish(feed['server'], key, entry)
|
xmpp.publish(feed['server'], key, entry)
|
||||||
|
|
||||||
# And we update the last updated date for the feed
|
# And we update the last updated date for the feed
|
||||||
|
@ -60,6 +60,9 @@ class publishx(sleekxmpp.ClientXMPP):
|
|||||||
iq['pubsub']['configure']['form'].addField('pubsub#type',
|
iq['pubsub']['configure']['form'].addField('pubsub#type',
|
||||||
ftype = 'text-single',
|
ftype = 'text-single',
|
||||||
value = NS_ATOM)
|
value = NS_ATOM)
|
||||||
|
iq['pubsub']['configure']['form'].addField('pubsub#deliver_payload',
|
||||||
|
ftype = 'boolean',
|
||||||
|
value = 0)
|
||||||
iq['pubsub']['configure']['form'].addField('pubsub#description',
|
iq['pubsub']['configure']['form'].addField('pubsub#description',
|
||||||
ftype = 'text-single',
|
ftype = 'text-single',
|
||||||
value = description)
|
value = description)
|
||||||
@ -77,7 +80,6 @@ class publishx(sleekxmpp.ClientXMPP):
|
|||||||
item = pubsub.Item()
|
item = pubsub.Item()
|
||||||
item['id'] = entry.id
|
item['id'] = entry.id
|
||||||
|
|
||||||
#payload = ET.Item()
|
|
||||||
ent = ET.Element("entry")
|
ent = ET.Element("entry")
|
||||||
ent.set('xmlns', NS_ATOM)
|
ent.set('xmlns', NS_ATOM)
|
||||||
|
|
||||||
@ -91,7 +93,6 @@ class publishx(sleekxmpp.ClientXMPP):
|
|||||||
content = ET.SubElement(ent, "content")
|
content = ET.SubElement(ent, "content")
|
||||||
content.set('type', entry.content[0].type)
|
content.set('type', entry.content[0].type)
|
||||||
|
|
||||||
#document, errors = tidy_document()
|
|
||||||
content.text = entry.content[0].value
|
content.text = entry.content[0].value
|
||||||
|
|
||||||
if(hasattr(entry, 'links')):
|
if(hasattr(entry, 'links')):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user