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

Fix yt transcript encoding errors #614

Closed
wants to merge 3 commits into from

Conversation

fitchmultz
Copy link

What this Pull Request (PR) does

Fix error in the encoded output when using the yt command with --transcript.

Reproduce the error with the command
yt --transcript https://youtu.be/k8cdByDa3oA\?si\=__-Tlmvt7KoP7eR2

Original Output:
In the early years of microelectronics,  there were many types of transistors. But one rose up to rule all the others. Based on  an idea that physicists have chased for decades. And today, we have made more of it than anythingÂ

Fixed Output:
In the early years of microelectronics,  there were many types of transistors. But one rose up to rule all the others. Based on  an idea that physicists have chased for decades. And today, we have made more of it than anything 

Solution:
Edit fabric/installer/client/cli/yt.py line 113.
Original code: print(transcript_text.encode('utf-8').decode('unicode-escape'))
Fixed code: print(transcript_text)
Reinstall: pipx install . --force

Thanks to CaeChao here: #468 (comment)

@danielmiessler
Copy link
Owner

We're getting ready to migrate to Golang; please resubmit then if this hasn't been addressed. Thank you!

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

Successfully merging this pull request may close these issues.

2 participants