From d4751a47c6471109ff14616b0c159b7f20beb6ad Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 16 Oct 2020 13:03:56 +0100 Subject: [PATCH] Check text --- newswire.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newswire.py b/newswire.py index 0d854c82..3a65b76a 100644 --- a/newswire.py +++ b/newswire.py @@ -236,8 +236,8 @@ def getRSS(session, url: str, moderated: bool, try: result = session.get(url, headers=sessionHeaders, params=sessionParams) if result: - if int(len(result) / 1024) < maxFeedSizeKb and \ - not containsInvalidChars(result): + if int(len(result.text) / 1024) < maxFeedSizeKb and \ + not containsInvalidChars(result.text): return xmlStrToDict(result.text, moderated, maxPostsPerSource) else: print('WARN: feed is too large: ' + url)