morrolinux / subito-it-searcher

searcher for subito.it
94 stars 35 forks source link

Error when using price options #25

Closed alenada99 closed 1 year ago

alenada99 commented 1 year ago

When using with --minPrice and --maxPrice options i get this error:

running query ("Switch" - https://www.subito.it/annunci-italia/vendita/usato/?shp=true&q=nintendo%20switch&from=mysearches&order=datedesc)... Traceback (most recent call last): File "/home/alessandro/GoogleDrive/Progetti/subito-it-searcher/subito-searcher.py", line 243, in <module> refresh(notify) File "/home/alessandro/GoogleDrive/Progetti/subito-it-searcher/subito-searcher.py", line 111, in refresh run_query(url[0], search[0], notify, minP[0], maxP[0]) File "/home/alessandro/GoogleDrive/Progetti/subito-it-searcher/subito-searcher.py", line 166, in run_query if not queries.get(name).get(url).get(minPrice).get(maxPrice).get(link): # found a new element AttributeError: 'NoneType' object has no attribute 'get'

I think the problem may be a conversion error between strings and integers in the run_query function. I'm currently trying to solve the issue. If successfull, i will make a pull request.