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: YouTube video transcrips Import #1091

Merged

Conversation

amirtds
Copy link

@amirtds amirtds commented Mar 1, 2022

Background

https://appsembler.atlassian.net/browse/BLACK-2163
By the end of 2021 YouTube Deprecated their Timedtext API. This caused problem for our customers to download automatically the transcripts for their YouTube video for their videos in Open edX. Open edX team is aware of this error https://openedx.atlassian.net/browse/TNL-9460, but there was no movement on solving this issue from open edx end.
We tried to solve this by replacing the API with a new YouTube API, but the new API requires OAuth authentication and only works with videos in the same channel and even with corresponding changes in the codebase the Transcripts didn't work.

Our solution

I developed a new API that responds with SRT version of transcripts for a given YouTube video ID for example https://us-central1-penn-state.cloudfunctions.net/youtube-transcript?video_id=AcZZlbWRyUM You can try this with different videos just replace what comes after video_id= with your YouTube video ID.
After receiving the Transcripts from our API we make a call to transcripts/upload to upload the transcript for a given unit component location, and we store the transcripts. To make it visible in Studio and LMS.
The functionality should work as the following video

Filmage.2022-02-28_204527.mp4

@amirtds amirtds force-pushed the amir/fix/ginkgo-youtube-transcripts branch 3 times, most recently from dd65bfb to 0b164f1 Compare March 1, 2022 20:17
@amirtds amirtds marked this pull request as ready for review March 1, 2022 22:32
@amirtds amirtds changed the title WIP Amir/fix/ginkgo youtube transcripts fix: YouTube video transcrips Import Mar 1, 2022
Copy link

@johnbaldwin johnbaldwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, that's all that is needed to download and process SRT files?

@johnbaldwin
Copy link

Is this a fix that should also go into Tahoe?

@amirtds
Copy link
Author

amirtds commented Mar 2, 2022

Thanks @johnbaldwin Yes Tahoe needs a similar fix, but we can't merge this PR to our Juniper branch I need to check changes we had from Ginkgo to Juniper and will open a new PR.

@amirtds amirtds force-pushed the amir/fix/ginkgo-youtube-transcripts branch from 0b164f1 to 4369535 Compare March 3, 2022 01:39
@amirtds amirtds requested a review from OmarIthawi March 3, 2022 19:10
Copy link

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @amirtds! Let me know when you make the Juniper pull request.

I think this is something worth contributing upstream:

@amirtds amirtds merged commit 47b3dad into appsembler/ginkgo/master Mar 9, 2022
@amirtds amirtds deleted the amir/fix/ginkgo-youtube-transcripts branch March 9, 2022 13:42
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.

3 participants