def copy_artical(url):
req = urllib.request.Request(url)
req.add_header('User-Agent','Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko')
html = urllib.request.urlopen(req).read().decode('GB2312')
return html
url = str(input('请输入你要爬取网站的网址:'))
a = copy_artical(url)
with open('copy_in','w') as f:
f.write(a)