Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

card_type bug #17

Open
fuurinko opened this issue Oct 17, 2024 · 0 comments
Open

card_type bug #17

fuurinko opened this issue Oct 17, 2024 · 0 comments

Comments

@fuurinko
Copy link

fuurinko commented Oct 17, 2024

python直接运行不成功,debug后发现一些代码错误。
card type 为 11和8此处str格式但未加引号
以下为改正版本
def get_card_type_11(params, headers):
data = send_request(API_URL, params, headers)
#print(data)
if data is None:
return []
cards = data.get("cards", [])
card_type_11_info = []
for card in cards:
if card.get("card_type") == "11":
card_group = card.get("card_group", [])
for item in card_group:
if item.get("card_type") == "8":
info = {
"scheme": item.get("scheme"),
"title_sub": item.get("title_sub")
}
card_type_11_info.append(info)
#print(card_type_11_info)
return card_type_11_info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant