Python实战之网络与爬虫篇-----如何查看用户Star了哪些库

1.问题求解

试着用前面所学的知识查看用户Codingchaozhang 都Starred了哪些库,并且自动在游览器中打开这些库的地址。

2.背景知识

github接口网址: https://api.github.com/

从中找了starred_url的网址

{"current_user_url": "https://api.github.com/user","current_user_authorizations_html_url": "https://github.com/settings/connections/applications{/client_id}","authorizations_url": "https://api.github.com/authorizations","code_search_url": "https://api.github.com/search/code?q={query}{&page,per_page,sort,order}","commit_search_url": "https://api.github.com/search/commits?q={query}{&page,per_page,sort,order}","emails_url": "https://api.github.com/user/emails","emojis_url": "https://api.github.com/emojis","events_url": "https://api.github.com/events","feeds_url": "https://api.github.com/feeds","followers_url": "https://api.github.com/user/followers","following_url": "https://api.github.com/user/following{/target}","gists_url": "https://api.github.com/gists{/gist_id}","hub_url": "https://api.github.com/hub","issue_search_url": "https://api.github.com/search/issues?q={query}{&page,per_page,sort,order}","issues_url": "https://api.github.com/issues","keys_url": "https://api.github.com/user/keys","notifications_url": "https://api.github.com/notifications","organization_repositories_url": "https://api.github.com/orgs/{org}/repos{?type,page,per_page,sort}","organization_url": "https://api.github.com/orgs/{org}","public_gists_url": "https://api.github.com/gists/public","rate_limit_url": "https://api.github.com/rate_limit","repository_url": "https://api.github.com/repos/{owner}/{repo}","repository_search_url": "https://api.github.com/search/repositories?q={query}{&page,per_page,sort,order}","current_user_repositories_url": "https://api.github.com/user/repos{?type,page,per_page,sort}","starred_url": "https://api.github.com/user/starred{/owner}{/repo}","starred_gists_url": "https://api.github.com/gists/starred","team_url": "https://api.github.com/teams","user_url": "https://api.github.com/users/{user}","user_organizations_url": "https://api.github.com/user/orgs","user_repositories_url": "https://api.github.com/users/{user}/repos{?type,page,per_page,sort}","user_search_url": "https://api.github.com/search/users?q={query}{&page,per_page,sort,order}"
}

3.编码

# api https://api.github.com/
# star_pages https://api.github.com/users/CodingChaozhang/starredimport  requests
import  webbrowserstar_url = 'https://api.github.com/users/CodingChaozhang/starred'star_pages = requests.get(star_url).json();
print(star_pages)for star_page in star_pages:url=star_page['html_url']webbrowser.open(url)

Python实战之网络与爬虫篇-----如何查看用户Star了哪些库相关推荐

  1. 微信小程序开发笔记 进阶篇⑤——getPhoneNumber 获取用户手机号码(基础库 2.21.2 之前)

    文章目录 一.前言 二.前端代码wxml 三.前端代码js 四.后端java 五.程序流程 六.参考 一.前言 微信小程序开发笔记--导读 大部分微信小程序开发者都会有这样的需求:获取小程序用户的手机 ...

  2. 微信小程序开发笔记 进阶篇⑥——getPhoneNumber 获取用户手机号码(基础库 2.21.2 之后)

    文章目录 一.前言 二.前端代码wxml 三.前端代码js 四.后端java 五.程序流程 六.参考 一.前言 微信小程序开发笔记--导读 大部分微信小程序开发者都会有这样的需求:获取小程序用户的手机 ...

  3. python爬虫技术可以干什么-Python实战:网络爬虫都能干什么?

    整站下载器:siteSucker https://blog.csdn.net/l_215851356/article/details/54377582 http://python.jobbole.co ...

  4. python爬虫能干什么-Python实战:网络爬虫都能干什么?

    整站下载器:siteSucker https://blog.csdn.net/l_215851356/article/details/54377582 http://python.jobbole.co ...

  5. Python实战:网络爬虫都能干什么?

    @冰蓝 之前在北京买房,谁想房价开始疯长,链家的房价等数据分析只给了一小部分,远远不能满足自己的需求.于是晚上花了几个小时的时间写了个爬虫,爬下了北京所有的小区信息及北京所有小区的所有历史成交记录. ...

  6. python实战:分分钟上手爬虫获取风景与美女背景图片

    电脑桌面背景好久没换了,心血来潮突然想换一下,可系统自带的又没几张看中的,咋办?网上爬呀.论爬虫编程,应该没有比python更简洁的了,学编写软件为的就是应用,哪个快捷哪个高效就用哪个,实用主义. 于 ...

  7. Python实战——斗图网爬虫

    导入的包 request 一个很实用的python HTTP客户端库,编写爬虫和测试服务器响应数据时经常会用到 语法实例: import requestsr = requests.get('https ...

  8. Python实战之网络编程socket学习笔记及简单练习

    sk = socket.socket(socket.AF_INET,socket.SOCK_STREAM,0) 参数一:地址簇 socket.AF_INET IPv4(默认) socket.AF_IN ...

  9. 技术学习:Python(21)|爬虫篇|selenium自动化操作浏览器

    ​ 活动地址:CSDN21天学习挑战赛 前言 Selenium是一个用于Web应用程序测试的工具.Selenium测试直接运行在浏览器中,就像真正的用户在操作一样.支持的浏览器包括IE(7, 8, 9 ...

最新文章

  1. linux shell 执行多个文件,/etc/profile、~/.bash_profile等几个文件的执行过程
  2. C#动态调用webservice
  3. 机器学习-关联之Apriori算法原理及实战
  4. python装饰器补充
  5. 8.霍夫变换:线条——动手编码、霍夫演示_4
  6. Burp Suite
  7. java知识点3(null)
  8. 《R语言初学指南》一1.2 向量
  9. ps -ef | grep 命令详解
  10. 新型计算机病毒2017,【2017年整理】计算机病毒(修改好).ppt
  11. access工资明细表_Access工资管理系统
  12. Google play billing(Google play 内支付) 上篇
  13. Android性能优化系列之Bitmap图片优化
  14. Android App架构设计
  15. Nacos百度网盘下载
  16. JApiDocs 生成父子菜单结构
  17. 通俗理解 三次握手四次挥手(老友依恋式)
  18. crm系统的销售管理模块
  19. Hash表查找成功和查找不成功的平均查找长度(附总结)
  20. 腾讯云部署tomcat服务器

热门文章

  1. 计算机考试第一套试题操作,计算机等级考试一级上机试题(第一套)
  2. SIGIR2021的5篇论文
  3. Cortex-M3(NXP LPC 1788) 启动代码
  4. 贵州省最好的计算机专科学校,贵州计算机专业学校排名
  5. MySQL入门之课后思考题第八章
  6. matlab 矩阵旋转变换矩阵,matlab 矩阵与线性变换与计算.ppt
  7. 在计算机教学方面的论文,关于计算机教学方面的论文
  8. 软件过程能力成熟度模型
  9. 练就一双慧眼,看透身体健康
  10. 大学期间最浪费时间的十件事