From 08702555448f3c83c9ca04699f9c83f768c07223 Mon Sep 17 00:00:00 2001 From: ccppi Date: Mon, 22 Jul 2024 10:54:28 +0200 Subject: [PATCH] typo results instead of result add debugg logs --- lib/helpers.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/helpers.py b/lib/helpers.py index 5cd3739..39ff331 100644 --- a/lib/helpers.py +++ b/lib/helpers.py @@ -79,8 +79,9 @@ def finder(results,item,**modes): else: result = entry.findAll(item.tag,class_=item.tag_content) log("found count results:",len(result)) - if not result and DEBUG == True: - for x in results: + if len(result)==0 and DEBUG == True: + log("len result: ",len(result)) + for x in result: log("No entry found for: ",item.name,item.tag,item.tag_content," -->", x) input() if result: @@ -88,10 +89,9 @@ def finder(results,item,**modes): if i>(len(result)-1): log("len:",len(result)-1,"i:",i) log("index out of bounds fall back to the %d count",i) - # input("Press Enter..") i=(len(result)-1) result2 = result[i] - if GETCHILDREN!='': + if GETCHILDREN != '': found = False for results in result: child = results.find(GETCHILDREN) @@ -116,6 +116,7 @@ def finder(results,item,**modes): elif CLEANDATE==1: content.append(jobs_ch_clean_date(result2.text.strip())) else: + log(result2) content.append(result2.text.strip()) if not result: if item.tag_content == "pubdate":