예제 #1
0
파일: bitbucket.py 프로젝트: rgrp/dashboard
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')
예제 #2
0
파일: github.py 프로젝트: rgrp/dashboard
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')
예제 #3
0
파일: test.py 프로젝트: rgrp/dashboard
 def test_feed(self):
     url = "http://blog.okfn.org/feed/"
     feed.gather(database, url=url)