chore(cod_api_tool.py): fix userInfo.json path
This commit is contained in:
parent
0bbf8d2c31
commit
79d4dbb68e
@ -121,7 +121,7 @@ class CodStatsManager:
|
|||||||
self.save_to_file(identities_data, 'identities.json')
|
self.save_to_file(identities_data, 'identities.json')
|
||||||
|
|
||||||
# Check if userInfo.json exists to determine if we should fetch additional data
|
# Check if userInfo.json exists to determine if we should fetch additional data
|
||||||
user_info_file = os.path.join(STATS_DIR, 'userInfo.json')
|
user_info_file = os.path.join('userInfo.json')
|
||||||
if os.path.exists(user_info_file):
|
if os.path.exists(user_info_file):
|
||||||
# Additional user data
|
# Additional user data
|
||||||
info = api.Me.info()
|
info = api.Me.info()
|
||||||
@ -129,14 +129,8 @@ class CodStatsManager:
|
|||||||
event_feed = api.Me.eventFeed()
|
event_feed = api.Me.eventFeed()
|
||||||
cod_points = api.Me.codPoints()
|
cod_points = api.Me.codPoints()
|
||||||
connected_accounts = api.Me.connectedAccounts()
|
connected_accounts = api.Me.connectedAccounts()
|
||||||
|
settings = api.Me.settings()
|
||||||
try:
|
|
||||||
settings = api.Me.settings()
|
|
||||||
# Make sure settings is JSON serializable
|
|
||||||
self.save_to_file(self._ensure_json_serializable(settings), 'settings.json')
|
|
||||||
except TypeError as e:
|
|
||||||
print(f"Warning: Could not save settings due to serialization error: {e}")
|
|
||||||
|
|
||||||
# Save additional data
|
# Save additional data
|
||||||
self.save_to_file(info, 'info.json')
|
self.save_to_file(info, 'info.json')
|
||||||
self.save_to_file(friend_feed, 'friendFeed.json')
|
self.save_to_file(friend_feed, 'friendFeed.json')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user