import requests from bs4 import BeautifulSoup
url = "https://python123.io/ws/demo.html"
r = requests.get(url)
print(r.status_code)
print("\n")
soup = BeautifulSoup(open(r"C:\Users\Administrator\Desktop\beautifulsoup\demo.html")) print(soup.prettify())
|