1. 程式人生 > >爬蟲簡單入門:第一個簡單爬蟲

爬蟲簡單入門:第一個簡單爬蟲

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)