mirror of
https://github.com/Steffo99/steamleaderboards.git
synced 2024-11-21 15:24:18 +00:00
parent
3f2f77eed1
commit
428b11fae4
1 changed files with 3 additions and 7 deletions
|
@ -86,13 +86,9 @@ class Leaderboard:
|
||||||
_bs = BeautifulSoup(xml.content, features="lxml-xml")
|
_bs = BeautifulSoup(xml.content, features="lxml-xml")
|
||||||
for entry in _bs.find_all("entry"):
|
for entry in _bs.find_all("entry"):
|
||||||
self.entries.append(Entry(entry))
|
self.entries.append(Entry(entry))
|
||||||
if _bs.response.entryend:
|
try:
|
||||||
entry_end = int(_bs.response.entryend.text)
|
next_request_url = _bs.find_all("nextRequestURL")[0].text
|
||||||
if entry_end < int(_bs.response.totalleaderboardentries.text):
|
except IndexError:
|
||||||
next_request_url = f"https://steamcommunity.com/stats/{self.app_id}/leaderboards/{self.lbid}/?xml=1&start={entry_end + 1}"
|
|
||||||
else:
|
|
||||||
next_request_url = None
|
|
||||||
else:
|
|
||||||
next_request_url = None
|
next_request_url = None
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
|
|
Loading…
Reference in a new issue