youtube-urls-feed/scripts/gen-urls-for-vid.rb

17 lines
466 B
Ruby
Raw Normal View History

2024-08-18 02:49:05 +03:00
#!/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###"
2024-08-18 05:14:09 +03:00
patterns << "https://music.youtube.com/watch?v=###VID###"
2024-08-18 02:49:05 +03:00
patterns.each do |p|
puts("#{p.gsub("###VID###", vid)}")
end