springboot怎么把数据传给前端:springboot 如何引入前端 bootstrap?
这种问题网上一搜一大堆,你可以具体找一篇文章试试,遇到问题可以针对相关问题去提问。springboot通过jar包方式引入bootstrap_个人文章 - SegmentFault 思否 这不是查查就
顺晟科技
2022-10-18 13:16:27
151
你好,我想保存网页的源代码到任何任何文本文件,并将其保存在C:\文件夹中。
我试着用这段代码获取网页的源代码:
html = driver.page_source
print(html)
如何将页面源代码保存到文本文件中的C:\文件夹?
顺晟科技:
试试这个:
import urllib.request
site = urllib.request.urlopen('http://somesite.com')
data = site.read()
file = open("C:\\file.txt","wb") #open file in binary mode
file.writelines(data)
file.close()
或者这个
import urllib.request
def extractHTML(url):
urllib.request.urlretrieve(url, 'C:\\file.txt')
在此处05
2022-12
02
2022-12
02
2022-12
29
2022-11
29
2022-11
24
2022-11