ginipick commited on
Commit
3f3f818
ยท
verified ยท
1 Parent(s): 0041e1e

Update app-backup2.py

Browse files
Files changed (1) hide show
  1. 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 = space.get('title', space.get('name', 'Unknown'))
47
 
48
- author_info = space.get('author', {})
49
- if isinstance(author_info, dict):
50
- space_author = author_info.get('user', author_info.get('name', 'Unknown'))
51
- else:
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