python 爬虫 爬取json格式数据 简单实例
json
适用于现代 C++ 的 JSON。
项目地址:https://gitcode.com/gh_mirrors/js/json
·
这里以爬取搜狗壁纸的图片的url为例,废话不多说,直接上代码
import requests
url = "https://pic.sogou.com/pics?query=%C3%A8&mode=1&start=48&reqType=ajax&reqFrom=result&tn=0"
res = requests.get(url).json() #把爬取到的json格式的网页转换成字典格式
for i in range(48): #具体解析其中的图片源地址
print(res.get("items")[i].get("pic_url"))
适用于现代 C++ 的 JSON。
最近提交(Master分支:5 个月前 )
3a570393
Bumps [cppcheck](https://github.com/msclock/cppcheck-wheel) from 1.4.8 to 1.5.0.
- [Release notes](https://github.com/msclock/cppcheck-wheel/releases)
- [Changelog](https://github.com/msclock/cppcheck-wheel/blob/master/.releaserc.js)
- [Commits](https://github.com/msclock/cppcheck-wheel/compare/v1.4.8...v1.5.0)
---
updated-dependencies:
- dependency-name: cppcheck
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2 天前
4d216e0c
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.1 to 4.6.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1...ea165f8d65b6e75b540449e92b4886f43607fa02)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2 天前
更多推荐




所有评论(0)