Skip to content

Commit

Permalink
Add support for the new YouTube handles (already worked actually).
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Oct 24, 2022
1 parent caddbe5 commit b92c9fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,9 @@
# https://www.youtube.com/watch?v=vVXbgbMp0oY&t=5s
elsif /youtube\.com\/.*[?&]list=(?<playlist_id>[^&#]+)/ =~ params[:q]
# https://www.youtube.com/playlist?list=PL0QrZvg7QIgpoLdNFnEePRrU-YJfr9Be7
elsif /youtube\.com\/(?<user>[^\/?#]+)/ =~ params[:q]
elsif /youtube\.com\/@?(?<user>[^\/?#]+)/ =~ params[:q]
# https://www.youtube.com/khanacademy
# https://www.youtube.com/@khanacademy
elsif /\b(?<channel_id>(?:UC[^\/?#]{22,}|S[^\/?#]{12,}))/ =~ params[:q]
# it's a channel id
else
Expand Down

0 comments on commit b92c9fb

Please sign in to comment.