diff --git a/bot.py b/bot.py index 3cd9518..5c5ccb3 100644 --- a/bot.py +++ b/bot.py @@ -350,10 +350,12 @@ class QBBot(slixmpp.ClientXMPP): self.api_caller.search_delete(search_id) parsed_res = json.loads(res.text) message += "```\n" - message += "Total results for \"" + search_string + "\": " + str(parsed_res["total"]) + "\n" the_list = [[r["fileName"], r["fileUrl"], str(r["nbSeeders"]), r["fileSize"]] for r in parsed_res["results"]] # Remove torrents with no seeds from the search results the_list = [i for i in the_list if int(i[2]) != 0] + + # Report the number of torrents in the search results + message += "Total results for \"" + search_string + "\": " + str(len(the_list)) + "\n" message += "\n".join([str(i) + ". " + l[0] + ", " "seeds: " + str(l[2]) + ", "