-
-
Save PBXg33k/7b80a86d53b922f0873a to your computer and use it in GitHub Desktop.
# ################################################################### | |
# Mp3tag (v2.39+) parsing for VGMdb.net, created by dano on 2010-01-20 | |
# Updated and maintained by PBX_g33k starting from 2015-09-01 | |
# | |
# | |
# This file should be in your sources directory | |
# On Windows XP it's | |
# C:\Documents and Settings\*username*\Application Data\Mp3tag\data\sources | |
# | |
# Changelog: | |
# [2015-09-01] | |
# - FIX: Coverurl fixed | |
# | |
# ################################################################### | |
[Name]=VGMdb - Search by Album | |
[BasedOn]=vgmdb.net | |
[IndexUrl]=http://vgmdb.net/search?q=%s | |
[AlbumUrl]=http://vgmdb.net/album/ | |
[WordSeperator]=+ | |
[IndexFormat]=%Catalog%|%_url%|%Album%|%Year% | |
[SearchBy]=%album% | |
[Encoding]=url-utf-8 | |
[ParserScriptIndex]=... | |
# ################################################################### | |
# I N D E X | |
# ################################################################### | |
#debug "on" "C:\\tmp\\debug_vgmdb_A.htm" "10" | |
#debugwriteinput "C:\\tmp\\vgmdb_search by album.htm" | |
findline "<tr rel='rel_" 1 1 | |
ifnot "<tr rel" | |
say "|" | |
sayoutput "CurrentURL" | |
say "|" | |
say "|" | |
exit | |
endif | |
do | |
replace "|" "/" | |
findinline "span class=" #'catalog'> | |
findinline ">" | |
sayuntil "</span" | |
say "|" | |
# URL | |
findinline "http://vgmdb.net/album/" | |
sayuntil "\"" | |
say "|" | |
# Album | |
findinline "class=\"albumtitle\"" | |
findinline "\">" | |
sayuntil "</span>" | |
say "|" | |
# Year | |
findinline "</tr>" | |
movechar -1 | |
findinline "\"" -1 | |
findinline ">" | |
sayuntil "</" | |
saynewline | |
moveline 1 1 | |
unspace | |
while "<tr rel='rel_" 999 | |
[ParserScriptAlbum]=... | |
# ################################################################### | |
# A L B U M | |
# ################################################################### | |
#debug "on" "C:\\tmp\\debug_VGMdb_B.htm" "10" | |
#debugwriteinput "C:\\tmp\\VGMdb_B.htm" | |
# Album | |
outputto "Album" | |
findline "class=\"albumtitle" | |
replace "|" "$verticalBar()" | |
findinline "class=\"albumtitle" | |
findinline ">" | |
sayuntil "</span" | |
# Coverurl | |
outputto "coverurl" | |
findline "id=\"coverart\"" | |
findinline "style=\"background-image: url(" | |
if "'" | |
movechar 1 | |
sayuntil "'" | |
else | |
findinline "../" | |
sayuntil "\"" | |
endif | |
# set "coverurl" | |
# Catalog | |
outputto "Catalog" | |
findline "<b>Catalog Number</b>" | |
joinuntil "</tr>" | |
findinline "<td width=\"100%\">" | |
ifnot "N/A" | |
if "<span id=" | |
findinline "#\">" | |
sayuntil "</a>" | |
else | |
regexpreplace "<a[^>]+>" "" | |
replace "</a>" "" | |
findinline "<td width=\"100%\">" | |
sayuntil "</td>" | |
endif | |
endif | |
# Release Date | |
outputto "Year" | |
findline "<b>Release Date</b>" | |
moveline 1 | |
sayregexp "(?<=<td>)\d{4} *(?=</td>)" "" | |
if "<td><a " | |
findinline "title=\"View albums released on" | |
sayregexp "\d{4}(?=\" href)" "" "</a>" | |
endif | |
# Publish Format | |
outputto "Format" | |
findline "<b>Publish Format</b>" | |
joinuntil "</tr>" | |
findinline "<td>" | |
sayuntil "</td>" | |
# Media Format | |
outputto "Mediatype" | |
findline "<b>Media Format</b>" | |
joinuntil "</tr>" | |
findinline "<td>" | |
sayuntil "</td>" | |
# Classification (Genre) | |
outputto "Genre" | |
findline "<b>Classification</b>" | |
joinuntil "</tr>" | |
findinline "<td>" | |
sayuntil "</td>" | |
# Publisher | |
findline "<b>Published by</b>" | |
outputto "Publisher" | |
moveline 1 | |
regexpreplace "<span style=\"display:none\"><em> */ *</em></span>" "" | |
regexpreplace "<span title=\"[^\"]*\" class=\"artistname\" lang=\"en\" style=\"display:inline\">([^<]+)</span>" "$1" | |
regexpreplace "<span title=\"[^\"]*\" class=\"artistname\" lang=\"ja\" style=\"display:none\">.+?</span>" "" | |
regexpreplace "<span class=\"productname\" lang=\"en\" style=\"display:inline\">([^<]+)</span>" "$1" | |
regexpreplace "<span class=\"productname\" lang=\"[-\w]+\" style=\"display:none\">([^<]+)</span>" "" | |
regexpreplace "<a[^>]+>" "" | |
replace "</a>" "" | |
sayregexp "(?<=<td>)[^<]+(?=</td>)" "" | |
# Composer | |
findline "<b>Composed by</b>" | |
outputto "Composer" | |
moveline 1 | |
regexpreplace "<span style=\"display:none\"><em> */ *</em></span>" "" | |
regexpreplace "<span title=\"[^\"]*\" class=\"artistname\" lang=\"en\" style=\"display:inline\">([^<]+)</span>" "$1" | |
regexpreplace "<span title=\"[^\"]*\" class=\"artistname\" lang=\"ja\" style=\"display:none\">.+?</span>" "" | |
regexpreplace "<a[^>]+>" "" | |
replace "</a>" "" | |
sayregexp "(?<=<td>)[^<]+(?=</td>)" "" | |
# Arranged | |
findline "<b>Arranged by</b>" | |
outputto "Writer" | |
moveline 1 | |
regexpreplace "<span style=\"display:none\"><em> */ *</em></span>" "" | |
regexpreplace "<span title=\"[^\"]*\" class=\"artistname\" lang=\"en\" style=\"display:inline\">([^<]+)</span>" "$1" | |
regexpreplace "<span title=\"[^\"]*\" class=\"artistname\" lang=\"ja\" style=\"display:none\">.+?</span>" "" | |
regexpreplace "<a[^>]+>" "" | |
replace "</a>" "" | |
sayregexp "(?<=<td>)[^<]+(?=</td>)" "" | |
# Performed | |
findline "<b>Performed by</b>" 1 1 | |
unspace | |
if "<tr><td" | |
outputto "Artist" | |
moveline 1 | |
regexpreplace "<span style=\"display:none\"><em> */ *</em></span>" "" | |
regexpreplace "<span title=\"[^\"]*\" class=\"artistname\" lang=\"en\" style=\"display:inline\">([^<]+)</span>" "$1" | |
regexpreplace "<span title=\"[^\"]*\" class=\"artistname\" lang=\"ja\" style=\"display:none\">.+?</span>" "" | |
regexpreplace "<a[^>]+>" "" | |
replace "</a>" "" | |
sayregexp "(?<=<td>)[^<]+(?=</td>)" "" | |
else | |
findline "nff44455553333332_____-------" -1 1 | |
endif | |
# Tracks | |
# findline "<b>Disc 2</b></span>" | |
findline "class=\"smallfont\"><span class=\"label\">" | |
do | |
outputto "Tracks" | |
moveline 1 | |
findinline "width=\"100%\">" | |
sayuntil "</td>" | |
say "|" | |
outputto "_Length" | |
moveline 1 | |
sayregexp "(?<=<span class=\"time\">)[\d:]+(?=</span>)" "" | |
say "|" | |
findline "class=\"smallfont\"><span class=\"label\">" 1 1 | |
while "<td " | |
# Notes | |
gotoline 1 | |
outputto "Notes" | |
findline "<h3>Notes</h3>" | |
findline "class=\"smallfont\">" | |
regexpreplace "\s*<br ?\/?>\s*" "\r\n" | |
findinline "class=\"smallfont\">" | |
ifnot "<i class='label'>" | |
sayuntil "</div>" | |
endif | |
# VGMdb Album URL | |
outputto "VGMdb Album Url" | |
sayoutput "CurrentUrl" | |
# ... Customization ... | |
#set "genre" "Game" | |
# Fields that you want to remove | |
# (to remove a field write: set "field") |
Hey, I'm running into an error when trying to retrieve an album,
"Error connecting to server: vgmdb.net
Invalid URL"
Did I do something wrong or did vgmdb make some changes?
Edit: Nevermind, I just had to update mp3tag, I guess my version was outdated. Sorry! Hope this comment helps if anyone has the same issue.
Doesn't work anymore.
I can't thank you enough for this. You're an absolute god.
Unfortunately, it's not working anymore.
still works; just change everything that says 'http' to 'https'
still works; just change everything that says 'http' to 'https'
Wonderful tip! Worked!
Could you adhjust it so that instead of year containing just the year we can get iso format, like YYYY-MM-DD?
That's a pretty good idea, i'll look into it
Looks like the script recently broke. Update to vgmdb perhaps?
I got it to work with the current site. It works well enough for my needs, but it might not be 100% the same as before.
It should work with Mp3Tag, but I can only test it with puddletag on Linux, not the actual Mp3Tag on Windows.
Get it here:
https://gist.github.com/jiyunomegami/3c190ba8af13252840ea70eea10afcd7
I'm having the same issue. Help would be greatly appreciated.