会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ddpjj
博客园
首页
新随笔
联系
订阅
管理
2023年2月25日
Beautiful Soup库的安装
摘要: 安装:‘以管理员身份运行’cmd 执行pip install beautifulsoup4 Beautiful Soup库的理解: 解析、遍历、维护标签树的功能库 那么何为标签树? 1 from bs4 import BeautifulSoup 2 import requests 3 r=reque
阅读全文
posted @ 2023-02-25 13:57 小小派下士
阅读(86)
评论(0)
推荐(0)
2023年2月24日
爬取网页图片
摘要: 网络图片链接的格式: http://www.example.com/picture.jpg http://img0.dili360.com/ga/M00/34/5E/wKgBzFS8cISAYYg5AB5r1Gar-oQ103.tub.jpg 1 import requests 2 import o
阅读全文
posted @ 2023-02-24 18:26 小小派下士
阅读(44)
评论(0)
推荐(0)
Python爬取亚马逊商品页面
摘要: 仍然利用Requests库来实现 1 import requests 2 r=requests.get('https://www.amazon.cn/gp/product/B01M8L5Z3Y') 3 r.status_code 4 r.encoding=r.apparent_encoding 5
阅读全文
posted @ 2023-02-24 17:39 小小派下士
阅读(203)
评论(0)
推荐(0)
Request库
摘要: win+R输入cmd再执行 pip install requests import requests r=requests.get('https://www.baidu.com/') print(r.status_code)#状态码,200表示正常 r.text#url对应的页面内容,为字符串形式r
阅读全文
posted @ 2023-02-24 16:21 小小派下士
阅读(40)
评论(0)
推荐(0)
公告