stop at the end

This commit is contained in:
mwiegand 2022-04-10 22:43:03 +02:00
parent 9845e9068e
commit aaa35f20c2

View file

@ -170,9 +170,12 @@ while True:
print('getting next page')
r = user.session.get(f'https://help.steampowered.com/en/accountdata/AjaxLoadMoreData/?url=GetFriendMessagesLog&continue={continue_value}')
continue_value = r.json()['continue']
html = r.json()['html']
trs = BeautifulSoup(html, 'html.parser').find_all('tr')
parse_trs(trs)
if continue_value:
html = r.json()['html']
trs = BeautifulSoup(html, 'html.parser').find_all('tr')
parse_trs(trs)
else:
break
# CLOSE