Import data from active web page

Get answers about syncing MediaMonkey 4 with iPods and other devices.

Moderator: Gurus

kpstuff
Posts: 5
Joined: Wed Feb 17, 2016 12:51 am

Import data from active web page

Post by kpstuff »

Is it possible in MM or RegExp to import data directly from an active web page?
I'm using Midomi to identify hundreds of un-labeled tracks. The web page returns the Title and the Artist.
This data is held in the h1 and h2 elements of the web page.
I'm wondering if it's possible to automatically bring that h1 and h2 data into the TITLE and ARTIST fields in MM.
Lowlander
Posts: 56491
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Import data from active web page

Post by Lowlander »

You'd need to script a solution specific to that site.
kpstuff
Posts: 5
Joined: Wed Feb 17, 2016 12:51 am

Re: Import data from active web page

Post by kpstuff »

Thanks,
You've answered the first issue - it IS possible have a script to retrieve data from a website. The second issue is that the URL is dynamic. URL is appended with an "id=" code, specific to each piece of music identified. That starts getting pretty complex. I'm not a scripter. A lot of experience in database programming (years ago) and less in VBS. Regex I'm kind lost.
I was HOPING someone already had a similar script but searches have been fruitless. Seems like a great add-on though. How many people have countless unidentified tracks and get data using SoundHound, Shazam, Midomi (or others) and then type in the results. Nearly 10,000 of my 75,000 tracks need serious tagging and auto-tag seems useless when metadata is blank, or filled with "unknown".
rivorson
Posts: 594
Joined: Thu Jul 25, 2013 4:17 am

Re: Import data from active web page

Post by rivorson »

You can write a script that will retrieve a web page, but I don't believe it is possible to retrieve data that happens to be active in your browser. The script would have to open an Internet session of its own and submit the track data, but Midomi requires Flash to work and that won't be possible within a script.

You could try AcoustID Generator for the same result.

And just as a bonus, if you want to use regex in any project then regexr.com is an invaluable service. I went from being completely confused by regex to being reasonably confident is just a couple of days thanks to its references, cheat sheet, and interactive guide.
kpstuff
Posts: 5
Joined: Wed Feb 17, 2016 12:51 am

Re: Import data from active web page

Post by kpstuff »

I've seen several VBS samples on how to strip data out of web page. Other examples show how to retrieve the URL of the active page.
And using Google Developer Tools I can see that the desired data is elements h1 and h2.
Seems to me and my novice brain then - (and following your comments rivorson)
-Get the active URL
-Then open the active URL and strip the data
(so I have the same webpage open twice. Guess it could close the second copy once the script ends.)

I've been able to capture the data using Excel VBA routines so the data seems to be readily available. Just takes extra step.
I'd love to just click PLAY in MM, click FIND in Midori
Click the script (populating two fields)
Move to the next song. Wash rinse repeat!!
kpstuff
Posts: 5
Joined: Wed Feb 17, 2016 12:51 am

Re: Import data from active web page

Post by kpstuff »

Update - just to close out this discussion, here's a summary of a Vb Script I wrote.
I have MM running background, Windows Explorer open to folder with all the "unknown" tracks, Midomi open in I.E.

Dbl-clk - on a song in my Windows Explorer window - it begins playing in MM.
Click - "Listen" in the Midomi window. Wait for results.
Click - OK and file is automatically renamed
(continue with the next track, and so on)

Three clicks and I have the file renamed to "Title - Artist". With the added benefit of being able to listen to the song while it's happening, on the remote chance that the results returned are questionable. Then I can reject or edit the data. (So far this has been rare with Midomi). Finally, scan the updated folder in MM and re-tag per filename.

I've tried several downloaded programs that claim to be able to use audio signature analysis to rename files. I've been generally disappointed. A success rate of 80% to 90% just doesn't cut it - once you've merged all those tracks into a 70,000 track library.
Not quite as automated as I'd hoped for - but hey, no typing, no copy paste, just three clicks and I got it.
Post Reply