赞
踩
一、代码展示
- import requests
- url='https://www.bilibili.com/'
- #指定对象
- response =requests.get(url=url)
- #获得相应对象
- page_text=response.text
- print(page_text)
- #持续化存储
- with open('./bilibili.html','w',encoding='utf-8')as fp:
- fp.write(page_text)
- print('爬取结束')
二、运行结果显示
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。