Closed eseiver closed 1 year ago
Thanks so much for this helpful review! I have addressed all the points in some additional commits and updated a few more tests. Let me know if there's anything else needed.
Somehow the builds haven't run yet, I will have a look into that!
Apparently travis ci has to explicitly grant me OSS credits now (that did not use to be the case). I have opened a support case with them and hope that this will be resolved soon!
Alright that makes sense that preserve_formatting
can be mostly in class methods not in __init__
. Updated and also moved _FORMATTING_TAGS
into _TranscriptParser
.
Hi @eseiver, thanks for the additional fixes! I just added a few of the missing things myself. I will merge this now and release it with v0.6.0 🥳
Decided to address #191 myself! This changes
_TranscriptParser()
to have apreserve_formatting
option that defaults toFalse
. I then added the ability to set this parameter at the user level inYouTubeTranscriptApi.get_transcript()
, making changes to the intermediary classes and methods where appropriate. Finally, I updated the testing XML asset in transcript.xml.static to include escaped italics, as well as adding a new testtest_get_transcript_formatted()
that keeps the italics. None of the other similar tests were changed because it still defaults to the old version.