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

中国银行信用卡 PDF parser 无法正确处理单行账单 #19

Closed
richard1122 opened this issue Feb 6, 2025 · 2 comments
Closed

Comments

@richard1122
Copy link
Contributor

Image

此时 content 完整解析了一行:

content = 2023-08-08\n2023-08-08\n****\n网银转入\n****.92

Image

if re.match(
r"[0-9]+-[0-9]+-[0-9]+\n[0-9]+-[0-9]+-[0-9]+(\n[0-9]+)?",
content,
re.MULTILINE,
):
lines = content.split("\n")
trans_date = lines[0]
post_date = lines[1]
description = ""

我会开一个 PR 来更新

@jiegec
Copy link
Owner

jiegec commented Feb 6, 2025

这就是 PDF 解析头疼的一点,它有时候会合在一起,有时候又不会。。

@richard1122
Copy link
Contributor Author

没有 public 的 test case,我用本地数据对敲了一下,只会增加 single line 的 bills,对于 multiple lines 的没有额外影响

@jiegec jiegec closed this as completed Feb 6, 2025
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

2 participants