From e0e31e83303f434ed52e84030b16f22db5fe5ed3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 22 Nov 2020 16:10:58 +0000 Subject: [PATCH] Testing sequence for feeds --- newswire.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/newswire.py b/newswire.py index 11f37f6ec..1e5e9998f 100644 --- a/newswire.py +++ b/newswire.py @@ -477,7 +477,12 @@ def xmlStrToDict(baseDir: str, domain: str, xmlStr: str, maxFeedItemSizeKb: int) -> {}: """Converts an xml string to a dictionary """ - if 'rss version="2.0"' in xmlStr: + if '' in xmlStr and '' in xmlStr: + print('YouTube feed: reading') + return atomFeedYTToDict(baseDir, domain, + xmlStr, moderated, mirrored, + maxPostsPerSource, maxFeedItemSizeKb) + elif 'rss version="2.0"' in xmlStr: return xml2StrToDict(baseDir, domain, xmlStr, moderated, mirrored, maxPostsPerSource, maxFeedItemSizeKb) @@ -485,11 +490,6 @@ def xmlStrToDict(baseDir: str, domain: str, xmlStr: str, return atomFeedToDict(baseDir, domain, xmlStr, moderated, mirrored, maxPostsPerSource, maxFeedItemSizeKb) - elif '' in xmlStr and '' in xmlStr: - print('YouTube feed: reading') - return atomFeedYTToDict(baseDir, domain, - xmlStr, moderated, mirrored, - maxPostsPerSource, maxFeedItemSizeKb) return {}