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

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)

 

posted @ 2018-12-17 15:10  青春叛逆者  阅读(211)  评论(0编辑  收藏  举报