A NodeJS project that gives you a much cleaner API when working with data from Ultimate Guitar.
- Provides the ability to query UG's auto-complete API that returns an array of recommended links.
- Given a link to a song, you can parse all of it's meta data in one nice JSON file as documented below.
- The tablature gets parsed into sections, which in turn are sliced by measures, which encapsulate every given time step.
- Clone or Download the source.
- The relevent file to require is "scraper.js".
- scraper.js contains the async method "getSong(...)" which takes a link to a UG song as a parameter, and calls the callback with a JSON object with the format mentioned below.
- The file main.js contains a demo server that can be interacted with via the index.html HTML file.
- The demo shows off the auto-complete, and query search by displaying all songs related to your search string. You can also parse the given song on the fly by clicking on it.
- Original: Brings you to the actual tablature.
- Formatted: Displays the raw parsed JSON.
{
"artist": "Artist Name",
"song_name": "Song Name",
"tab_url": "https://www.ultimate-guitar.com/",
"difficulty": "beginner",
"tuning": [ "E", "A", "D", "G", "B", "E" ],
"raw_tabs": "...",
"parsed_tabs": {
"order": [ "Chorus", "Verse 1", "Verse 2" ],
"sections": {
"Chorus": {
"measures": [
{
"steps": [
{
"string_1": "3",
"string_2": "2",
"string_3": "0",
"string_4": "0",
"string_5": "3",
"string_6": "3",
"chord": "G"
},
null
]
}
]
},
"Verse 1": { "...": "..." },
"Verse 2": { "...": "..." }
}
}
}