本文整理汇总了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)