本文整理匯總了Python中users.Users.items方法的典型用法代碼示例。如果您正苦於以下問題:Python Users.items方法的具體用法?Python Users.items怎麽用?Python Users.items使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類users.Users
的用法示例。
在下文中一共展示了Users.items方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: readUsers
# 需要導入模塊: from users import Users [as 別名]
# 或者: from users.Users import items [as 別名]
def readUsers(URL):
the_page = AuthoRequest(URL)
soup = BeautifulSoup(the_page, "html5lib")
usersJson = json.loads(soup.get_text())
USERS = []
for i in usersJson:
USERS.append(i['login'])
lastid = usersJson[len(usersJson)-1]['id']
return USERS, lastid
Users = Users(0)
# while Users.lastid <= 45:
# startURL = 'https://api.github.com/users?since=' + str(Users.lastid)
# UsersList,lastid = readUsers(startURL)
# Users.lastid = lastid
# for item in UsersList:
# Users[item] = user(item)
Users['TimIainMarsh'] = user('TimIainMarsh')
Users['jasrusable'] = user('jasrusable')
Users['CraigNielsen'] = user('CraigNielsen')
Users['avoid3d'] = user('avoid3d')
for uname, user_thing in Users.items():
print(str(user_thing.name) + " " + str(user_thing.public_repos))
for repoN, repo in user_thing.Repos.items():
print('--'+str(repo.repoName)+' '+repo.language)