【发布时间】:2018-05-07 17:15:45
【问题描述】:
我正在解析一个网络链接,我想将整个网页保存到格式为 .html 的本地文件中。我想直接将汤输出到本地的html 文件以将副本上传到 S3-AWS 吗?
from bs4 import BeautifulSoup
import requests
url_name = "https://<weblink>/"
soup = BeautifulSoup(url_name,"html.parser")
现在,我只是想知道,像.txt 我们可以将汤输出到.html as well。建议表示赞赏。
【问题讨论】:
-
你是在说像this这样的事情吗?
标签: python json beautifulsoup