boardfish / smash-custom-music-getter

Retrieves files from smashcustommusic.com
0 stars 1 forks source link

Get official song names from smashcustommusic.com #1

Closed boardfish closed 7 years ago

boardfish commented 7 years ago

http://smashcustommusic.com/48330 for example has the page title .haсk//Infection: Desktop Theme - Video Game Music. It can be inferred from that that titles go by the format [game name]: [song name] - Video Game Music. Seems this is the way to do it..

open('https://www.ruby-lang.org/es/') do |f|
  str = f.read.scan(/<title>(.*?)<\/title>/)
end

It just needs running through regex for a filename, which is: ^[\w,\s-]+\.[A-Za-z]{3}$

I've tried but I just can't get it to output properly. The job is practically done...