mirror of
https://github.com/Steffo99/steamleaderboards.git
synced 2024-11-24 08:34:19 +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")
|
||||
for entry in _bs.find_all("entry"):
|
||||
self.entries.append(Entry(entry))
|
||||
if _bs.response.entryend:
|
||||
entry_end = int(_bs.response.entryend.text)
|
||||
if entry_end < int(_bs.response.totalleaderboardentries.text):
|
||||
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:
|
||||
try:
|
||||
next_request_url = _bs.find_all("nextRequestURL")[0].text
|
||||
except IndexError:
|
||||
next_request_url = None
|
||||
|
||||
def __repr__(self):
|
||||
|
|
Loading…
Reference in a new issue