mirror of https://gitlab.com/bashrc2/epicyon
Json feed version
parent
4308317b3d
commit
000162d85c
14
newswire.py
14
newswire.py
|
@ -504,10 +504,10 @@ def _atomFeedToDict(baseDir: str, domain: str, xmlStr: str,
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
def _jsonFeedToDict(baseDir: str, domain: str, xmlStr: str,
|
def _jsonFeedV1ToDict(baseDir: str, domain: str, xmlStr: str,
|
||||||
moderated: bool, mirrored: bool,
|
moderated: bool, mirrored: bool,
|
||||||
maxPostsPerSource: int,
|
maxPostsPerSource: int,
|
||||||
maxFeedItemSizeKb: int) -> {}:
|
maxFeedItemSizeKb: int) -> {}:
|
||||||
"""Converts a json feed string to a dictionary
|
"""Converts a json feed string to a dictionary
|
||||||
See https://jsonfeed.org/version/1
|
See https://jsonfeed.org/version/1
|
||||||
"""
|
"""
|
||||||
|
@ -699,9 +699,9 @@ def _xmlStrToDict(baseDir: str, domain: str, xmlStr: str,
|
||||||
xmlStr, moderated, mirrored,
|
xmlStr, moderated, mirrored,
|
||||||
maxPostsPerSource, maxFeedItemSizeKb)
|
maxPostsPerSource, maxFeedItemSizeKb)
|
||||||
elif 'https://jsonfeed.org/version/1' in xmlStr:
|
elif 'https://jsonfeed.org/version/1' in xmlStr:
|
||||||
return _jsonFeedToDict(baseDir, domain,
|
return _jsonFeedV1ToDict(baseDir, domain,
|
||||||
xmlStr, moderated, mirrored,
|
xmlStr, moderated, mirrored,
|
||||||
maxPostsPerSource, maxFeedItemSizeKb)
|
maxPostsPerSource, maxFeedItemSizeKb)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue