我不知道如何使用python launchpadlib搜索ppas。
换句话说,我正在寻找用于官方启动垫(ubuntu) ppa搜索的python接口。这里提供了一个用于布道的web表单。
我不仅想搜索某些关键字,而且还想获得一个完整的清单,所有的ppas可用的发射台。
有人能给我一个提示,找出相应的API吗?
发布于 2015-10-02 21:58:57
没有API可以这样做,而且可能不会这样做,因为您不应该通过Python请求大量的对象集合。
的PPA
这是不可能的。在https://bugs.launchpad.net/launchpadlib上报告一个特性请求。
的用户拥有的所有PPA
这是可能的,使用launchpad.people['username'].ppas,完整的例子:
python
>>> from launchpadlib.launchpad import Launchpad
>>> launchpad = Launchpad.login_anonymously('just testing', 'production', '/home/user/tmp')
>>> [ ppa.name for ppa in launchpad.people['mvo'].ppas ]
[u'apt-clone-lucid', u'apt-fix-633967', u'apt-ftparchive-arch', u'apt-ftparchive-lucid', u'apt-ftparchive-srccache-backport', u'apt-gcc5', u'apt-https-fix', u'apt-lucid-chris', u'apt-precise', u'apt-src-ftparchive', u'apt-vivid', u'auto-upgrade-tester', u'debsigs-trusty', u'eglibc-trusty', u'freeglut-multiarch', u'gir-multiarch', u'hwe-eol', u'linux-firmware-nonfree', u'lp1347721', u'lp1371058', u'lucid-precise-upgrades', u'lucid-precise-upgrades2', u'oem', u'openoffice', u'ppa', u'public-test', u'python-apt', u'release-upgrader-apt', u'samba4', u'sdk', u'smem', u'synaptic', u'test-dependencies', u'ubuntu-sdk-libs', u'unattended-upgrades', u'upgrade-tests', u'wine', u'wsmancli']你可能会认为你可以把它和搜索人结合起来,但这是行不通的。你能得到多少人是有限度的(我想是50人左右)。
这里记录了整个API:https://launchpad.net/+apidoc/1.0.html
https://askubuntu.com/questions/646308
复制相似问题