Json feed version

merge-requests/30/head
Bob Mottram 2021-02-12 11:30:23 +00:00
parent 4308317b3d
commit 000162d85c
1 changed files with 7 additions and 7 deletions

View File

@ -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 {}