isaacbernat / netflix-to-srt

Rip, extract and convert subtitles to .srt closed captions from .xml/dfxp/ttml and .vtt/WebVTT (e.g. Netflix, YouTube)
MIT License
741 stars 72 forks source link

Fix regex to match subtitle lines in XML file #45

Closed snoymy closed 8 months ago

snoymy commented 8 months ago

Since previous regex only match with line start with "<p begin=..." but I found XML that I get it have some property before "begin=", so I fix it to match with case that start with "<p " and contain "begin=".

And I also add "sample11.xml" for example file.

isaacbernat commented 8 months ago

Thanks for the fix and the test case! Also, congrats on your PR merge being the repo's 100th commit :D