Код: Выделить всё
import requests, bs4, html5lib
from bs4 import BeautifulSoup
url = "https://trouver-ip.com"
ip = input("Choisissez une IP : ")
response = requests.post(url, data={"ip": ip})
soup = BeautifulSoup(response.text, "html.parser")
print(response)
def compare():
if soup.find("tbody"):
tableau = soup.findAll("html")
return(tableau)
else:
print("Aucun résultat, foirage de code masturbin")
tableau = compare()
print(tableau)
Подробнее здесь: https://stackoverflow.com/questions/740 ... n-i-try-to