dkb-visa icon indicating copy to clipboard operation
dkb-visa copied to clipboard

html included in csv file

Open inktrap opened this issue 9 years ago • 0 comments

Note that sometimes the original csv-file includes information, formatted via html. I solved it like this:

    # check that unparseable lines are not included as transactions
    # dkb should really fix their csv export, they should have the
    # money for that, right?
    csv_text = csv_text.splitlines()
    csv_text_filtered = []
    for line in csv_text:
        if "<br />" in line:
            continue
        else:
            csv_text_filtered.append(line)
    csv_text = "\n".join(csv_text_filtered)

This will exclude transactions that have <br /> in their description.

inktrap avatar Jan 30 '16 17:01 inktrap