Merge pull request #180 from phenom4n4n/patch-1
[LoveCalculator] Patch AttributeError
This commit is contained in:
commit
dbf84c8b81
@ -49,7 +49,11 @@ class LoveCalculator(Cog):
|
|||||||
|
|
||||||
result_image = soup_object.find("img", class_="result__image").get("src")
|
result_image = soup_object.find("img", class_="result__image").get("src")
|
||||||
|
|
||||||
result_text = soup_object.find("div", class_="result-text").get_text()
|
result_text = soup_object.find("div", class_="result-text")
|
||||||
|
if result_text is None:
|
||||||
|
result_text = f"{x} and {y} aren't compatible 😔"
|
||||||
|
else:
|
||||||
|
result_text.get_text()
|
||||||
result_text = " ".join(result_text.split())
|
result_text = " ".join(result_text.split())
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user