From 75f691b00938ba13e2d2dc05e0cbac56c174191c Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 11 Nov 2018 15:21:43 +0100 Subject: [PATCH] feeds: fix multi rules parsing --- morss/feeds.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/morss/feeds.py b/morss/feeds.py index d82dbac..b624f1c 100644 --- a/morss/feeds.py +++ b/morss/feeds.py @@ -115,8 +115,11 @@ class ParserBase(object): else: key = 0 + len_items = len(rules['items']) + for arg in self.rules.keys(): - if isinstance(self.rules[arg], list): + if (isinstance(self.rules[arg], list) + and len(self.rules[arg]) == len_items): self.rules[arg] = self.rules[arg][key] def parse(self, raw):