コード例 #1
0
def countries_per_gdp():
    url = git.url_gdp('JavaScript',10000).replace('1','{0}',1)
    data =[zip(git.usernames(url.format(elm)),git.emails(url.format(elm)),git.names(url.format(elm)),git.location(url.format(elm)),git.date(url.format(elm))) for elm in range(1,5)]
    for i in data:
        for j in i:
            print j
コード例 #2
0
import time
import github_filter_modules as git


def countries_per_gdp():
    url = git.url_gdp('JavaScript',10000).replace('1','{0}',1)
    data =[zip(git.usernames(url.format(elm)),git.emails(url.format(elm)),git.names(url.format(elm)),git.location(url.format(elm)),git.date(url.format(elm))) for elm in range(1,5)]
    for i in data:
        for j in i:
            print j

def url_country(programming_language,country):
    return 'https://github.com/search?l={0}&p=1&q=location%3A{1}&type=Users&utf8=%E2%9C%93'.format(programming_language,country)




url = url_country('JavaScript','nigeria').replace('1','{0}',1)
url1 = url_country('JavaScript','nigeria')
num = git.upto(url1) + 1

dat =[]

for elm in range(1,num):
    dat.append(zip(git.usernames(url.format(elm)),git.emails(url.format(elm)),git.names(url.format(elm)),git.location(url.format(elm)),git.date(url.format(elm))))
    time.sleep(60)


for i in dat:
    for j in i:
        print j