Amazon Web Sources


#1

Amazon.de, amazon.co.uk and Amazon.fr are working for me. I just changed all the .co.uk in the script below to .fr and .de and saved it under different names.

I hope it will keep on working for quite a while. :sunglasses:

# Mp3tag parsing for Amazon Web Service (v2.36 and higher)
#
# Web source created and maintained by dano
#  Last modified 2011-01-26
#
# minor additions by Florian and Dave Reid
#
# Save it in your Mp3tag data directory, i.e.
# C:\Documents and Settings\*username*\Application Data\Mp3tag\data\sources
#
#
#
[Name]=Amazon.co.uk
[BasedOn]=http://webservices.amazon.co.uk
[IndexUrl]=http://webservices.amazon.co.uk/onca/xml?Service=AWSECommerceService&AssociateTag=none&Operation=ItemSearch&SearchIndex=Music&Keywords=%s&ItemPage=1&ResponseGroup=ItemAttributes,Small,Tracks,Images
[AlbumUrl]=http://webservices.amazon.co.uk/onca/xml?Service=AWSECommerceService&AssociateTag=none&Operation=ItemLookup&ItemId
[WordSeperator]=%20
[IndexFormat]=%_url%|%_preview%|%Artist%|%Publisher%|%Tracks%|%Released%|%Album%
[SearchBy]=%album%

[ParserScriptIndex]=...
# ###################################################################
# This script parses the webpage for all releases
# by this albumname.
#
# The output format is defined by IndexFormat above, which
# is used by the selection dialog
# ###################################################################
regexpreplace "<Binding>[^<]+</Binding>" ""
do
	findinline "<Item>"
	say "="
	findinline "<ASIN>"
	sayuntil "</ASIN>"
	say "&ItemPage=1&ResponseGroup=ItemAttributes,Small,Tracks,Images"
	say "|"
	
	# Preview
	findinline "<DetailPageURL>"
	sayuntil "</DetailPageURL>"
	say "|"
	
	# Artist
	findinline "<ItemAttributes>"
	if "<Artist>"
		findinline "<Artist>"
		sayuntil "</Artist>"
	else
		if "<Creator"
			findinline "<Creator"
			findinline ">"
			sayuntil "</Creator>"
		else
			if "<Author>"
				findinline "<Author>"
				sayuntil "</Author>"
			endif
		endif
	endif
	say "|"
	
	# Publisher
	sayregexp "(?<=<Label>)[^<]+(?=</Label>)" ", " "</ItemAttributes>"
	say "|"
	
	# Total tracks
	sayregexp "(?<=Track Number=\")\d+(?=\">[^<]+</Track></Disc>)" ", " "</Item>"
	say "|"
	
	# Released	
	sayregexp "(?<=<ReleaseDate>)[-0-9]{4,10}(?=</ReleaseDate>)" ", " "</ItemAttributes>"
	say "|"
	
	#Album
	findinline "<Title>"
	sayuntil "</Title>"
	
	saynewline
	findinline "</Item>"
while "<Item>"

[ParserScriptAlbum]=...
# ###################################################################
# This script parses the albums page for all common information.
#
# The current output variable is set via the outputto command
# All these fields are used by the confirm online information dialog
# ###################################################################
regexpreplace "<Binding>[^<]+</Binding>" ""
# CoverURL
outputto "coverurl"
findinline "<LargeImage>" 1 1
movechar -12
if "<LargeImage>"
	findinline "<URL>"
	sayuntil "</URL>"
else
	findline "<ItemAttributes>"
	findinline "<MediumImage>" 1 1
	movechar -13
	if "<MediumImage>"
		findinline "<URL>"
		sayuntil "</URL>"
	else
		findline "<ItemAttributes>"
	endif
endif

# Artist
findinline "<ItemAttributes>"
outputto "Artist"
if "<Artist>"
	findinline "<Artist>"
	sayuntil "</Artist>"
else
	if "<Creator"
		findinline "<Creator"
		findinline ">"
		sayuntil "</Creator>"
	else
		sayregexp "(?<=<Author>)[^<]+(?=</Author>)" ", " "</ItemAttributes>"
	endif
endif

# Publisher
findinline "<Label>" 1 1
movechar -7
if "<Label>"
	outputto "Publisher"
	findinline "<Label>"
	sayuntil "</Label>"
else
	findline "<ItemAttributes>"
endif

# Year
findinline "<ReleaseDate>" 1 1
movechar -13
if "<ReleaseDate>"
	outputto "Year"
	findinline "<ReleaseDate>"
	saynextnumber
else
	findline "<ItemAttributes>"
	findinline "<PublicationDate>" 1 1
	movechar -17
	if "<PublicationDate>"
		outputto "Year"
		findinline "<PublicationDate>"
		saynextnumber
	else
		findline "<ItemAttributes>"
	endif
endif

# Album
outputto "Album"
findinline "<Title>"
sayuntil "</Title>"


#
gotoline 1
findinline "<Tracks>" 1 1
movechar -8
if "<Tracks>"
	findinline "</Tracks>"
	findinline "Disc Number=\"" -1 1
	findinline "\""
endif

ifnot "1\""

# Totaldiscs
outputto "tTotalDiscs"
saynextnumber

gotoline 1

# Tracks
findinline "<Tracks>" 1 1
movechar -8
if "<Tracks>"
	findinline " Number=\""
	movechar -9
	do		  
		movechar -4
		
		if "Disc"
		
			set "tTotalTracks"
			outputto "tTotalTracks"
			sayregexp "(?<=Track Number=\")\d+(?=\">[^<]+</Track></Di)" "" "sc><"		
			
			set "tmp" 
			outputto "tmp"
			findinline " Number=\""
			sayregexp "\d+" "" "\""
			
			outputto "Discnumber"
			sayregexp "\d+" "" "\""
			say "/"
			sayoutput "tTotalDiscs"
			
			findinline "<Track Number="
		else
			outputto "Discnumber"
			sayoutput "tmp"
			say "/"
			sayoutput "tTotalDiscs"
		endif
		say "|"
	   
		
		outputto "Track Temp"
		sayregexp "\d{1,3}" "," ">"
		say "/"
		sayoutput "ttotaltracks"
		say "|"
		
		outputto "Title Temp"
		findinline ">"
		sayuntil "</Track>"
		say "|"
		findinline "</Track>"
		
		outputto "tracks"
		say "|"
		
		findinline " Number=\"" 1 1
		movechar -9
	while " Number=\"" 500
	set "tmp"
	set "tTotalDiscs"
	set "tTotalTracks"
endif   # Tracks Discnumber

else
# Single Disc

gotoline 1

# Tracks
findinline "<Tracks>" 1 1
movechar -8
if "<Tracks>"
	outputto "TotalTracks"
	sayregexp "(?<=Track Number=\")\d+(?=\">[^<]+</Track></Disc>)" "" "</Tracks>"
	
	do	
		findinline "<Track Number="
		
		
		outputto "Track Temp"
		sayregexp "\d{1,3}" "," ">"
		say "/"
		sayoutput "totaltracks"
		say "|"
		
		outputto "Title Temp"
		findinline ">"
		sayuntil "</Track>"
		say "|"
		
		outputto "tracks"
		say "|"
		findinline "</Track>"
		if "</Disc>"
			findinline "<Disc Numbe" 1 1
			if "r="				
				findinline ">"
			endif
		endif
	while "<Track "
	set "TotalTracks"
endif

endif


outputto "title"
sayoutput "title temp"

outputto "track"
sayoutput "track temp"

set "title temp"
set "track temp"

Amazon web source is completely broken
#2

First of all. The script works fine. Is there a way to show the Cover Resolution in the results list, like it was in the earlier versions of the program? Thx


#3

Yes it might be possible. The script I am using was edited by me years ago. I can update it, but I beg for a little patience.


#4

I edited the newer Version of the Amazon Source. It now shows the Cover Resolution.

Amazon.de_custom.src (6.52 KB) for Amazon.de

Amazon.co.uk_custom.src (6.53 KB) for Amazon.co.uk

Amazon.fr_custom.src (6.52 KB) for Amazon.fr

On Win 10 all of the files must go here: c:\Program Files (x86)\Mp3tag\data\sources\

Note: you should customize the filenames of at least the .de source as of v283 it gets deleted upon installation.

Amazon.co.uk_custom.src (6.53 KB)

Amazon.de_custom.src (6.52 KB)

Amazon.fr_custom.src (6.52 KB)


#5

Thx a lot. I will try these scripts in the morning. I love this program. It was so genius. And with these script it is, again :slight_smile:


#6

Ok. Everything works fine again! Perfect!!!! Thx a lot.


#7

Ok, so I only use amazon for cover images and it seems .de works fine still in 2.82, but I saw your fix and gave it a try, but pasting your files into the sources folder doesn't add them as options in mp3tag. How do I get them to actually show up?


#8

You should copy the file "Amazon.de.src", modified by Dave Reid, to ...
"%appdata%\Mp3tag\data\sources\Amazon#Amazon.de.DaveReid.src"

DD.20170709.1232.CEST


#9

Thank you.

For anyone looking in Windows 7, the actual directory is: "C:\Users*username*\AppData\Roaming\Mp3tag\data\sources"

Here are the files to add to have the sources in the cover art sub menu:

Cover_Art_Amazon.de_custom.src (3.09 KB)

Cover_Art_Amazon.fr_custom.src (3.09 KB)

Cover_Art_Amazon.co.uk_custom.src (3.11 KB)

Cover_Art_Amazon.de_custom.src (3.09 KB)

Cover_Art_Amazon.fr_custom.src (3.09 KB)

Cover_Art_Amazon.co.uk_custom.src (3.11 KB)


#10

Now these scripts work fine. It will only tag the cover, the other information stays unchanged. Perfect.


#11

hi
yes i'm so happy
i guess it's the only script that can download covers
:smiley:

but i can't have them in a submenu

thanks


#12

You just have to change the second underscore (_) to # e.g. "Cover_Art_Amazon.co.uk_custom.src to Cover_Art#Amazon.co.uk_custom.src". This will put them to a submenu named Cover__Art with all Amazon sources in it.


#13

hi
thank you so much!


#14

Hi
sadly they stop to work :frowning: :frowning:


#15

I'm afraid so.

QUOTE (Mp3tag)
>>400 Bad Request