Ejemplo n.º 1
0
def gather(database, name=None):
    url = URL % name
    log.info(name)
    urlfh = urllib.urlopen(url)
    data = json.load(urlfh)
    urlfh.close()
    for repo in data['repositories']:
        furl = FEED % (name, repo['name'])
        feed.gather(database, url=furl, type='bitbucket')
Ejemplo n.º 2
0
def gather(database, name=None, account=None):
    url = URL % (account, name)
    log.info('%s: %s' % (account, name))
    urlfh = urllib.urlopen(url)
    data = json.load(urlfh)
    urlfh.close()
    for repo in data:
        furl = FEED % (name, repo['name'])
        feed.gather(database, url=furl, type='github')
Ejemplo n.º 3
0
 def test_feed(self):
     url = "http://blog.okfn.org/feed/"
     feed.gather(database, url=url)