Skip to content

8-2 出現錯誤想請問如何解決~ #7

@chilun0908

Description

@chilun0908

使用方法

items_json = request_shopee(keyword = '運動內衣', page = 0)

items = {}
#print(items_json)
for i in range(len(items_json)):
items[i] = items_json[i]['item_basic']

items

====>

TypeError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_12424\4043242175.py in
5 #print(items_json)
6 for i in range(len(items_json)):
----> 7 items[i] = items_json[i]['item_basic']
8 # items

TypeError: string indices must be integers

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions