youtube-urls-feed/scripts/gen-urls-for-vid.rb
Eliezer Croitoru 3dd3d30a96 1
2024-08-18 05:14:09 +03:00

17 lines
466 B
Ruby
Executable File

#!/usr/bin/env ruby
vid = ARGV[0]
patterns = []
patterns << "https://i.ytimg.com/vi/###VID###"
patterns << "https://i.ytimg.com/an_webp/###VID###"
patterns << "https://i.ytimg.com/sb/###VID###"
patterns << "https://youtu.be/###VID###"
patterns << "https://www.youtube.com/watch?v=###VID###"
patterns << "https://youtube.com/watch?v=###VID###"
patterns << "https://music.youtube.com/watch?v=###VID###"
patterns.each do |p|
puts("#{p.gsub("###VID###", vid)}")
end