no guarantee's, but try this AHK script
#singleinstance
#persistent
loop
{
if clipboard contains http://www.allmusic.com
gosub, parse
}
Return
Parse:
mins:=
Secs:=
tmp:=
tracks:=
TCnt:=0
urldownloadtofile, %clipboard%, c:\temp\temp.html
if errorlevel
{
msgbox, there was an error and the file was not downloaded
clipboard:=
return
}
loop, read, c:\temp\temp.html
{
if a_index > 200
{
if a_loopreadline contains listen now
{
filereadline, tmp, c:\temp\temp.html, a_index+5
stringtrimleft, tmp, tmp, 49
stringtrimright, tmp, tmp, 5
stringsplit, tmp_, tmp, :
if tmp_2
{
mins+= tmp_1
secs+= tmp_2
}
else
secs+= tmp_1
tmp_1:=
tmp_2:=
if Tracks
tracks.= "`n"
TCnt+=1
tracks.= "Track " . tcnt . " - " . tmp
}
}
if a_loopreadline contains <!-- End Tracks Table -->
{
mins+= floor(secs/60)
secs:= mod(secs,60)
clipboard:= mins . ":" . secs
msgbox, %tracks%`n`nTotal - %mins%:%secs%
Break
}
}
return
First up I'm behind a corporate firewall so I can't test it properly at the moment but it is working fine with local copies
run the script, then when you're on the relevant page, copy the URL. The script should retrieve the url from the clipboard, download and parse the file, do the math, then copy the result to the clipboard and popup a messagebox with the results (note that the script stays resident and only kicks in when there's a URL in the clipboard)
At the moment it's only set up for AllMusic.com, but I assume it could be extended to cover other sites
EDIT: amended the URL filter to limit the response to allmusic.com only