Uncommented play retrieval block from bgg_connection for debugging
This commit is contained in:
parent
da3af316fa
commit
507db6ac41
1 changed files with 9 additions and 15 deletions
|
|
@ -330,21 +330,15 @@ def get_plays() -> list[play_classes.Play]:
|
|||
|
||||
all_plays : list[play_classes.Play] = []
|
||||
|
||||
# for page in tqdm(
|
||||
# range(amount_of_pages_needed),
|
||||
# desc="Getting plays from BGG",
|
||||
# unit="requests"):
|
||||
# url = 'https://boardgamegeek.com/xmlapi2/plays?username={}&page={}'.format(auth_manager.username, page + 1)
|
||||
# plays_page_xml_object = url_to_xml_object(url)
|
||||
# for play_xml in plays_page_xml_object:
|
||||
# new_play = convert_play_xml_to_play(play_xml)
|
||||
# all_plays.append(new_play)
|
||||
|
||||
url = 'https://boardgamegeek.com/xmlapi2/plays?username={}&page=1'.format(auth_manager.username)
|
||||
plays_page_xml_object = url_to_xml_object(url)
|
||||
for play_xml in plays_page_xml_object:
|
||||
new_play = convert_play_xml_to_play(play_xml)
|
||||
all_plays.append(new_play)
|
||||
for page in tqdm(
|
||||
range(amount_of_pages_needed),
|
||||
desc="Getting plays from BGG",
|
||||
unit="requests"):
|
||||
url = 'https://boardgamegeek.com/xmlapi2/plays?username={}&page={}'.format(auth_manager.username, page + 1)
|
||||
plays_page_xml_object = url_to_xml_object(url)
|
||||
for play_xml in plays_page_xml_object:
|
||||
new_play = convert_play_xml_to_play(play_xml)
|
||||
all_plays.append(new_play)
|
||||
|
||||
return all_plays
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue