[Python] BeautifulSoup, web scraping | My HTTP request works (code 200) but when I try to...

Discussão em 'Python' iniciado por Stack, Junho 18, 2025.

  1. Stack

    Stack Membro Participativo

    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)


    Does ever someone had the same problem than me, and by the way, I looked many times on the web but don't found anything...

    Continue reading...

Compartilhe esta Página