爬取前的准备:
BeautifulSoup的导入:pip install BeautifulSoup4
requests的导入:pip install requests
下载jupyter notebook:pip install jupyter notebook
下载python,配置环境(可使用anocanda,里面提供了很多python模块)
完整代码:

存储的excel文档如下:

爬取前的准备:
BeautifulSoup的导入:pip install BeautifulSoup4
requests的导入:pip install requests
下载jupyter notebook:pip install jupyter notebook
下载python,配置环境(可使用anocanda,里面提供了很多python模块)
完整代码:
存储的excel文档如下:
本文标题:Python抓取新浪新闻数据
本文链接:https://www.haomeiwen.com/subject/lrjulctx.html
网友评论