feeds: add 'mode' to Parsers
parent
8e3d32f24c
commit
2dd9ae202d
|
@ -221,6 +221,7 @@ class ParserBase(object):
|
||||||
|
|
||||||
class ParserXML(ParserBase):
|
class ParserXML(ParserBase):
|
||||||
default_ruleset = 'rss-channel'
|
default_ruleset = 'rss-channel'
|
||||||
|
mode = 'xml'
|
||||||
mimetype = ['text/xml', 'application/xml', 'application/rss+xml',
|
mimetype = ['text/xml', 'application/xml', 'application/rss+xml',
|
||||||
'application/rdf+xml', 'application/atom+xml', 'application/xhtml+xml']
|
'application/rdf+xml', 'application/atom+xml', 'application/xhtml+xml']
|
||||||
|
|
||||||
|
@ -379,6 +380,7 @@ def parse_time(value):
|
||||||
|
|
||||||
class ParserJSON(ParserBase):
|
class ParserJSON(ParserBase):
|
||||||
default_ruleset = 'json'
|
default_ruleset = 'json'
|
||||||
|
mode = 'json'
|
||||||
mimetype = ['application/json', 'application/javascript', 'text/javascript']
|
mimetype = ['application/json', 'application/javascript', 'text/javascript']
|
||||||
|
|
||||||
def parse(self, raw):
|
def parse(self, raw):
|
||||||
|
|
Loading…
Reference in New Issue