I am parsing a weblink and I want to save the whole webpage to a local file in format .html
. I want to directly output soup to an html
file locally for uploading a copy to S3-AWS ?
from bs4 import BeautifulSoup
import requests
url_name = "https://<weblink>/"
soup = BeautifulSoup(url_name,"html.parser")
Now, I am just wondering, like .txt
can we output soup to .html as well
. Suggestions appreciated.