Spaces:
Running
Running
Update app-backup2.py
Browse files- app-backup2.py +6 -7
app-backup2.py
CHANGED
@@ -41,15 +41,14 @@ def format_spaces(spaces: Union[List[Dict], str]) -> str:
|
|
41 |
output += f" Content: {space}\n\n"
|
42 |
continue
|
43 |
|
44 |
-
#
|
45 |
space_id = space.get('id', 'Unknown')
|
46 |
-
space_name =
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
space_author = str(author_info)
|
53 |
|
54 |
space_likes = space.get('likes', 'N/A')
|
55 |
|
|
|
41 |
output += f" Content: {space}\n\n"
|
42 |
continue
|
43 |
|
44 |
+
# 'id' ํ๋์์ space ์ด๋ฆ ์ถ์ถ
|
45 |
space_id = space.get('id', 'Unknown')
|
46 |
+
space_name = space_id.split('/')[-1] if '/' in space_id else space_id
|
47 |
|
48 |
+
# 'author' ํ๋์์ ์์ฑ์ ์ ๋ณด ์ถ์ถ
|
49 |
+
space_author = space.get('author', 'Unknown')
|
50 |
+
if isinstance(space_author, dict):
|
51 |
+
space_author = space_author.get('user', space_author.get('name', 'Unknown'))
|
|
|
52 |
|
53 |
space_likes = space.get('likes', 'N/A')
|
54 |
|