爬虫简单入门:第一个简单爬虫

import requests
# socket-->http-->requests
response=requests.get('https://tieba.baidu.com/f?kw=%E6%B5%81%E6%B5%AA%E6%B1%89')
print(response.text)
with open('12.html','w+',encoding='utf8')as f:
    f.write(response.text)

猜你喜欢

转载自www.cnblogs.com/liangliangzz/p/10131648.html