您可以尝试
urllib2:
import urllib2page = urllib2.urlopen('http://stackoverflow.com')page_content = page.read()with open('page_content.html', 'w') as fid: fid.write(page_content)
您可以尝试
urllib2:
import urllib2page = urllib2.urlopen('http://stackoverflow.com')page_content = page.read()with open('page_content.html', 'w') as fid: fid.write(page_content)