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

[nrk] Subtitles can't be converted with python 2.6 #5036

Closed
jaimeMF opened this issue Feb 23, 2015 · 2 comments
Closed

[nrk] Subtitles can't be converted with python 2.6 #5036

jaimeMF opened this issue Feb 23, 2015 · 2 comments
Labels

Comments

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Feb 23, 2015

For example with http://tv.nrk.no/serie/ikke-gjoer-dette-hjemme/DMPV73000411/sesong-2/episode-1, the problem is that we call xml.etree.ElementTree.Element.itertext in this line, which is not available in 2.6.

We need to call itertext to correctly extract the text from nodes like this one:

<p begin="00:00:36.440" dur="00:00:07.500" style="left">-Vi har sprengt, brent, oversvømt ...<br />-Eksplodert, implodert, kortsluttet.</p>

(Call youtube-dl 'http://tv.nrk.no/serie/ikke-gjoer-dette-hjemme/DMPV73000411/sesong-2/episode-1' --write-sub --sub-format ttml for getting the ttml file)

I haven't looked into the python source code, so I don't know how hard is to backport the function.

@jaimeMF jaimeMF added the subtitles label Feb 23, 2015
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 24, 2015

I think it's OK to just workaround this by transform_source.

@dstftw dstftw closed this in 41b264e Feb 24, 2015
@jaimeMF
Copy link
Collaborator Author

@jaimeMF jaimeMF commented Feb 24, 2015

Thanks for looking into it.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.