agzam / youtube-sub-extractor.el

Extract YouTube video subtitles
GNU General Public License v3.0
30 stars 1 forks source link

Not able to get subs from certain youtube videos #19

Open burnthekernel opened 1 year ago

burnthekernel commented 1 year ago

Certain videos provide incorrect or no language option. Example: https://www.youtube.com/watch?v=v8VFTQ74bqo offers "en-ehkg" as the only language option while it should be "en-ehkg1hFWq8A". This is due to a minor issue in the regular expression. The fix is simple.

Original line 263: when (string-match "^\\([A-z|-]+\\)\\(.*\\)vtt," x) Fixed line 263: when (string-match "^\\([A-z0-9|-]+\\)\\(.*\\)vtt," x)

I checked with a few YouTube URLs, everything seems to work fine.

agzam commented 1 year ago

Thank you for reporting this. I'll take a look.