From 4ed62cf0d350aca330edf7d4830006a6ad75a081 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 13 Jan 2022 12:16:42 +0000 Subject: [PATCH] Ignore the first item in the feed list --- newswire.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/newswire.py b/newswire.py index a61f6eb94..dec0a727c 100644 --- a/newswire.py +++ b/newswire.py @@ -532,7 +532,10 @@ def _xml2str_to_dict(base_dir: str, domain: str, xml_str: str, rss_items = xml_str.split('') post_ctr = 0 max_bytes = max_feed_item_size_kb * 1024 + first_item = True for rss_item in rss_items: + if first_item: + continue if not rss_item: continue if len(rss_item) > max_bytes: @@ -625,7 +628,10 @@ def _xml1str_to_dict(base_dir: str, domain: str, xml_str: str, rss_items = xml_str.split(item_str) post_ctr = 0 max_bytes = max_feed_item_size_kb * 1024 + first_item = True for rss_item in rss_items: + if first_item: + continue if not rss_item: continue if len(rss_item) > max_bytes: @@ -708,7 +714,10 @@ def _atom_feed_to_dict(base_dir: str, domain: str, xml_str: str, atom_items = xml_str.split('') post_ctr = 0 max_bytes = max_feed_item_size_kb * 1024 + first_item = True for atom_item in atom_items: + if first_item: + continue if not atom_item: continue if len(atom_item) > max_bytes: