feeds: put code tgt
parent
3581f34db7
commit
adbaed9e54
|
@ -483,13 +483,6 @@ class Feed(object):
|
||||||
return len(self.get_raw('items'))
|
return len(self.get_raw('items'))
|
||||||
|
|
||||||
|
|
||||||
class FeedXML(Feed, ParserXML):
|
|
||||||
itemsClass = 'ItemXML'
|
|
||||||
|
|
||||||
def tostring(self, **k):
|
|
||||||
return etree.tostring(self.root.getroottree(), **k)
|
|
||||||
|
|
||||||
|
|
||||||
class Item(Uniq):
|
class Item(Uniq):
|
||||||
dic = ('title', 'link', 'desc', 'content', 'id', 'is_permalink', 'time', 'updated')
|
dic = ('title', 'link', 'desc', 'content', 'id', 'is_permalink', 'time', 'updated')
|
||||||
|
|
||||||
|
@ -536,5 +529,12 @@ class Item(Uniq):
|
||||||
lambda f: f.rmv('item_updated') )
|
lambda f: f.rmv('item_updated') )
|
||||||
|
|
||||||
|
|
||||||
|
class FeedXML(Feed, ParserXML):
|
||||||
|
itemsClass = 'ItemXML'
|
||||||
|
|
||||||
|
def tostring(self, **k):
|
||||||
|
return etree.tostring(self.root.getroottree(), **k)
|
||||||
|
|
||||||
|
|
||||||
class ItemXML(Item, ParserXML):
|
class ItemXML(Item, ParserXML):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue