python 获得github代码库列表
来源:互联网 发布:万能数据恢复大师官网 编辑:程序博客网 时间:2024/06/05 03:04
1.背景
2.代码
import reimport osdef GetUrl(num): str = os.popen("curl -G https://api.github.com/repositories?since=%d"%(num)).read() pattern = '"url"' pattern1='repos' urls=str.split(',\n') for i in urls: if pattern in i and pattern1 in i: # text1=i.splite(':') text=re.compile('"(.*?)"').findall(i)[1] print textif __name__=='__main__': GetUrl(1000)
其中num的值指的是页面的id,我们可以做一个循环,不断增大num的值,就可以无限提取repo。因为github的api对于流量是有限制的,所以这么做是一个可行的方法。
https://api.github.com/repos/wycats/merb-core
https://api.github.com/repos/rubinius/rubinius
https://api.github.com/repos/mojombo/god
https://api.github.com/repos/vanpelt/jsawesome
https://api.github.com/repos/wycats/jspec
https://api.github.com/repos/defunkt/exception_logger
https://api.github.com/repos/defunkt/ambition
https://api.github.com/repos/technoweenie/restful-authentication
https://api.github.com/repos/technoweenie/attachment_fu
https://api.github.com/repos/topfunky/bong
https://api.github.com/repos/Caged/microsis
https://api.github.com/repos/anotherjesse/s3
https://api.github.com/repos/anotherjesse/taboo
https://api.github.com/repos/anotherjesse/foxtracs
https://api.github.com/repos/anotherjesse/fotomatic
https://api.github.com/repos/mojombo/glowstick
https://api.github.com/repos/defunkt/starling
https://api.github.com/repos/wycats/merb-more
https://api.github.com/repos/macournoyer/thin
https://api.github.com/repos/jamesgolick/resource_controller
https://api.github.com/repos/jamesgolick/markaby
https://api.github.com/repos/jamesgolick/enum_field
https://api.github.com/repos/defunkt/subtlety
https://api.github.com/repos/defunkt/zippy
https://api.github.com/repos/defunkt/cache_fu
https://api.github.com/repos/KirinDave/phosphor
- python 获得github代码库列表
- python使用心得之获得github代码库列表
- python使用心得之获得github代码库列表
- Python 爬虫的工具列表( 附Github代码下载链接)
- Python 爬虫的工具列表( 附Github代码下载链接)
- Python 爬虫的工具列表 附Github代码下载链接
- Python 爬虫的工具列表 附Github代码下载链接
- Python 爬虫的工具列表 附Github代码下载链接
- 【代码笔记】iOS-plist获得城市列表
- github上总结的python资源列表
- 使用github同步python代码
- 架设github代码库
- 【python学习.Github上的代码】
- JAVA功能代码《10》----Java获得目录列表
- [小代码]获得已安装应用程序的列表
- Python使用Ckan API获得CKAN的group列表
- python中从字符串中获得单词列表
- Python - 列表(list) 的 详解 及 代码
- How can I refactor converting this array into a Hash
- USB枚举详细过程剖析
- wait系列函数
- 关于webview调用js出现has no method 'toString'
- 终端/控制台设置颜色字体、光标定位和清屏
- python 获得github代码库列表
- 从面试官的视角来提升面试者的必须具备的IT技能
- servlet应用案例
- 利用DHT网络原理制作bt采集蜘蛛
- 数组(静态初始化-常见问题)
- nl命令
- JS获取table表格任意单元格值
- 黑马程序员--泛型
- vs2010统计整个工程有多少行代码