This is for people who are comfortable with coding (you don’t have to write anything new though).
Since we now have to wait hours (sometimes an entire day) to import videos, I decided to start pulling the subtitles straight from YouTube, using simple code that just needs to be pasted into the console of the browser you’re using.
If you want to do this, here are the steps below (I don’t think it’s ideal, but here we go):
- open your browser
- open 1 tab that goes to LingQ, and 1 tab that goes to Youtube
- in the LingQ tab, click on Import in the top right, and then click Lesson
- in the Youtube tab, find the video you want to watch, copy that link
- in the LingQ tab, click on Original URL on the left, and paste in that Youtube click and click ADD
- in the Youtube tab, open the console debugger (this is different per browser, usually if you right click on the page where there is whitespace, it’ll have some sort of option for developer tools / console debug)
- paste in the function below, and hit Enter, the function will run right away
- copy the text that is printed (this is the transcript)
- in the LingQ tab, paste the copied text into the Input Text section
- create a title, and hit Save and Generate lesson
Here is the function you need to use in step 7:
(function() {
function getSubtitles(){
$('button.yt-spec-button-shape-next--outline[aria-label="Show transcript"]').click();
console.log($('#segments-container').textContent.replace(/\n\s+/g, '\n').replace(/^\s*\d+:\d+\s*/gm, '').replace(/\n/g, ' '));
}
getSubtitles();
})();
Again, this isn’t ideal, this is just some method I am starting to use while we wait for LingQ to let us quickly import lessons like we used to. It isn’t too painful once you’re in the groove of it, you’ll memorize the steps after the first run through, the main thing is keeping the function somewhere handy (maybe a sticky on the desktop?).