Removed print()s

This commit is contained in:
Jeison Yehuda Amihud (Blender Dumbass) 2022-03-30 17:52:36 +00:00
parent 3f2b0a1a0f
commit 1faa1ce108
2 changed files with 3 additions and 9 deletions

View file

@ -114,21 +114,15 @@ def suggestions(page, json):
# This function will render suggestions
page = page + "<br><br><h1>Replacements:</h1><br><br>"
print("json request")
found = search.suggest(json)
print("json received", len(found))
for i in found:
print(i[-1].get("names",["no name"])[0], "Drawing")
free = False
if "licenses" in i[-1] and i[-1]["licenses"]:
free = True
print(i[-1].get("names", ["nothing"])[0])
if not i[0] or i[-1] == json or not free:
continue
page = page + "<br><br>"

View file

@ -8,7 +8,7 @@
import os
import json
from difflib import SequenceMatcher
from difflib import SequenceMatcher # checks how similar are two strings
def similar(a, b):
# I guess it simpifies the syntax for SequenceMatcher
@ -86,7 +86,7 @@ def suggest(json_data):
for b in json_data.get(c, []):
if b in i.get(c, []):
score += 1
print(score, i.get("names",["no name"])[0], "SCORE")
found.append([score, i])
try: