mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-12 22:10:16 +02:00
Merge pull request #306 from Ydmir/master
EveWho-manager can now read more than 200 members.
This commit is contained in:
commit
a0955c054a
@ -15,6 +15,15 @@ class EveWhoManager():
|
|||||||
def get_corporation_members(corpid):
|
def get_corporation_members(corpid):
|
||||||
url = "http://evewho.com/api.php?type=corplist&id=%s" % corpid
|
url = "http://evewho.com/api.php?type=corplist&id=%s" % corpid
|
||||||
jsondata = requests.get(url).content
|
jsondata = requests.get(url).content
|
||||||
data=json.loads(jsondata.decode())
|
data = json.loads(jsondata.decode())
|
||||||
|
|
||||||
return {row["character_id"]:{"name":row["name"], "id":row["character_id"]} for row in data["characters"]}
|
members = {}
|
||||||
|
page_count=0
|
||||||
|
while len(data["characters"]):
|
||||||
|
for row in data["characters"]:
|
||||||
|
members[row["character_id"]] = {"name":row["name"], "id":row["character_id"]}
|
||||||
|
page_count=page_count+1
|
||||||
|
jsondata = requests.get(url + "&page=%i" % page_count).content
|
||||||
|
data = json.loads(jsondata.decode())
|
||||||
|
|
||||||
|
return members
|
||||||
|
Loading…
x
Reference in New Issue
Block a user