Check text

main
Bob Mottram 2020-10-16 13:03:56 +01:00
parent e5950d4363
commit d4751a47c6
1 changed files with 2 additions and 2 deletions

View File

@ -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)