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

Cannot parse <->..</-> tags #1

Closed
platten opened this issue Sep 2, 2011 · 2 comments
Closed

Cannot parse <->..</-> tags #1

platten opened this issue Sep 2, 2011 · 2 comments

Comments

@platten
Copy link

platten commented Sep 2, 2011

I have a few files with data between <-></-> tags which upsets minidom. sample output from mediainfo is below:

/mnt/smbshare/Hilemusic/Jazz/Miles Davis/Sketches Of Spain/01 Concierto de Aranjuez (Adagio).m4a MPEG-4 Base Media / Version 2 mp42 27.9 MiB 16mn 23s 238 Kbps Sketches of Spain Miles Davis Concierto de Aranjuez (Adagio) 1 8 Miles Davis Jazz 1997 UTC 2009-12-13 09:41:30 UTC 2011-05-02 16:51:20 103 Yes <-> 0000014B 00000107 0000564D 0000B641 00049D0B 0007B384 00007FAC 000072E0 0007A21A 0007B4F8 780e3b08 1 AAC Advanced Audio Codec LC 40 16mn 23s Variable 234 Kbps 301 Kbps 2 channels Front: L R 44.1 KHz Lossy 27.5 MiB (98%) 1.3.3.0 1.3.3.0 -q 0.60 UTC 2009-12-13 09:41:30 UTC 2011-05-02 16:51:20

here is a quick and dirty fix:
4a5

import re
75c76

< dom = minidom.parseString(xml_data)

        dom = minidom.parseString(re.sub('<->[\\s\\d\\w]+</->', '', xml_data))

Cheers,
Paul

@sbraz
Copy link
Owner

sbraz commented Feb 5, 2016

Hi, can you provide me with the complete XML?

@sbraz
Copy link
Owner

sbraz commented Mar 1, 2016

No feedback, I'm closing this.

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