commande partition réduite à part

This commit is contained in:
tfa
2022-09-26 17:16:42 +02:00
parent 3718a745b2
commit 48ed397bc8

View File

@@ -63,7 +63,7 @@ class ChefMou(Plugin):
s = soup.findAll('th', background='/fond3.gif')
ps = random.choice(s)
await evt.respond(ps.text)
elif pattern.__contains__("partition"):
elif pattern.__contains__("part"):
chunks = pattern.split(None, 2)
if len(chunks) != 3 :
await evt.respond(
@@ -95,7 +95,7 @@ class ChefMou(Plugin):
# Si trouvé le chercher sinon erreur
if len(idxTitre) > 0 :
for el in idxTitre :
self.log.info(parsedList[el] + ': ' + str(SequenceMatcher(None, chunks[2], parsedList[el]).ratio()))
self.log.info(originalList[el] + ': ' + str(SequenceMatcher(None, chunks[2], parsedList[el]).ratio()))
#Et on recherche dans la liste originale avec le titre original
s = soup.find('th', string=originalList[idxTitre[0]])
t = s.parent.findAll('a')