<?xml version="1.0" encoding="UTF-8"?>
<scraper framework="1.1" date="2009-09-30" name="Allmusic" content="albums" thumb="allmusic.png" language="en">
	<include>common/htbackdrops.xml</include>
	<include>common/allmusic.xml</include>
	<include>common/lastfm.xml</include>
	<GetSettings dest="3">
		<RegExp input="$$5" output="&lt;settings&gt;\1&lt;/settings&gt;" dest="3">
			<RegExp input="$$1" output="&lt;setting label=&quot;Enable Fanart&quot; type=&quot;bool&quot; id=&quot;htbfanart&quot; default=&quot;true&quot;&gt;&lt;/setting&gt;" dest="5+">
				<expression/>
			</RegExp>
			<RegExp input="$$1" output="&lt;setting label=&quot;Grab artist thumbs from Allmusic.com&quot; type=&quot;bool&quot; id=&quot;allmusicartistthumbs&quot; default=&quot;true&quot;&gt;&lt;/setting&gt;" dest="5+">
 				<expression></expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;setting label=&quot;Grab album thumbs from Allmusic.com&quot; type=&quot;bool&quot; id=&quot;allmusicalbumthumbs&quot; default=&quot;true&quot;&gt;&lt;/setting&gt;" dest="5+">
				<expression></expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;setting label=&quot;Grab artist thumbs from Last.fm&quot; type=&quot;bool&quot; id=&quot;lastfmartistthumbs&quot; default=&quot;false&quot;&gt;&lt;/setting&gt;" dest="5+">
				<expression></expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;setting label=&quot;Grab album thumbs from Last.fm&quot; type=&quot;bool&quot; id=&quot;lastfmalbumthumbs&quot; default=&quot;false&quot;&gt;&lt;/setting&gt;" dest="5+">
				<expression></expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;setting label=&quot;Grab artist thumbs from HTBackdrops&quot; type=&quot;bool&quot; id=&quot;htbthumbs&quot; default=&quot;true&quot;&gt;&lt;/setting&gt;" dest="5+">
				<expression></expression>
			</RegExp>
			<expression noclean="1"/>
		</RegExp>
	</GetSettings>
	<NfoUrl dest="3">
		<RegExp input="$$1" output="&lt;url&gt;http://www.\1/review&lt;/url&gt;" dest="3">
			<expression>(allmusic.com/album/.*)</expression>
		</RegExp>
		<RegExp input="$$1" output="&lt;url&gt;http://www.\1&lt;/url&gt;" dest="3">
			<expression>(allmusic.com/artist/.*)</expression>
		</RegExp>
	</NfoUrl>
	<CreateAlbumSearchUrl dest="3">
		<RegExp input="$$1" output="&lt;url&gt;http://www.allmusic.com/search/album/\1&lt;/url&gt;" dest="3">
			<expression />
		</RegExp>
	</CreateAlbumSearchUrl>
	<GetAlbumSearchResults dest="8">
		<RegExp input="$$5" output="&lt;results&gt;\1&lt;/results&gt;" dest="8">
			<RegExp input="$$1" output="&lt;entity&gt;&lt;year&gt;\4&lt;/year&gt;&lt;artist&gt;\3&lt;/artist&gt;&lt;title&gt;\2&lt;/title&gt;&lt;url cache=&quot;am-\3-\2-album.html&quot;&gt;http://www.allmusic.com/album/\1/review&lt;/url&gt;&lt;/entity&gt;" dest="5">
				<expression repeat="yes" noclean="1,2,3">&lt;td class=&quot;text-center&quot;&gt;[^&lt;]*&lt;a href.*?www.allmusic.com/album/([^&quot;]*)&quot;&gt;([^&lt;]*).*?&lt;td&gt;([^&lt;]*)&lt;/td&gt;.*?&lt;td&gt;.*?&lt;td&gt;([^&lt;]*)</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;entity&gt;&lt;year&gt;\4&lt;/year&gt;&lt;artist&gt;\3&lt;/artist&gt;&lt;title&gt;\2&lt;/title&gt;&lt;url cache=&quot;am-\3-\2-album.html&quot;&gt;http://www.allmusic.com/album/\1/review&lt;/url&gt;&lt;/entity&gt;" dest="5+">
				<expression repeat="yes" noclean="1,2,3">&lt;td class=&quot;text-center&quot;&gt;[^&lt;]*&lt;/td&gt;.*?www.allmusic.com/album/([^&quot;]*)&quot;&gt;([^&lt;]*).*?&lt;td&gt;([^&lt;]*)&lt;/td&gt;.*?&lt;td&gt;.*?&lt;td&gt;([^&lt;]*)</expression>
			</RegExp>
			<expression noclean="1" />
		</RegExp>
	</GetAlbumSearchResults>
	<GetAlbumDetails dest="3">
		<RegExp input="$$5" output="&lt;details&gt;\1&lt;/details&gt;" dest="3">
			<RegExp input="$$1" output="\1" dest="2">
				<expression noclean="1">&lt;h1 class=&quot;title&quot;&gt;([^&lt;]*)&lt;/h1&gt;</expression>
			</RegExp>
			<RegExp input="$$1" output="\1" dest="3">
				<expression noclean="1">&lt;a href=&quot;http://www.allmusic.com/album/([^&quot;]*)&quot;&gt;Overview&lt;</expression>
			</RegExp>
			<RegExp input="$$1" conditional="lastfmalbumthumbs" output="&lt;url function=&quot;GetLastFMAlbumThumbs&quot;&gt;http://ws.audioscrobbler.com/2.0/?method=album.getinfo&amp;artist=\2&amp;album=\1&amp;api_key=71e468a84c1f40d4991ddccc46e40f1b&lt;/url&gt;" dest="5+">
				<expression trim="1,2" encode="1,2">&lt;meta name=&quot;title&quot; content=&quot;([^-]*)- ([^&lt;]*)&quot; /&gt;</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;url cache=&quot;am-$$3-$$2-album.html&quot; function=&quot;ParseAMGAlbum&quot;&gt;http://www.allmusic.com/album/\1/review&lt;/url&gt;" dest="5+">
				<expression noclean="1">&lt;a href=&quot;http://www.allmusic.com/album/([^&quot;]*)&quot;&gt;Overview&lt;</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;url cache=&quot;am-$$3-$$2-album.html&quot; function=&quot;GetAMGReview&quot;&gt;http://www.allmusic.com/album/\1/review&lt;/url&gt;" dest="5+">
				<expression noclean="1">&lt;a href=&quot;http://www.allmusic.com/album/([^&quot;]*)&quot;&gt;Overview&lt;</expression>
			</RegExp>
			<expression noclean="1" />
		</RegExp>
	</GetAlbumDetails>
	<CreateArtistSearchUrl dest="3">
		<RegExp input="$$1" output="&lt;url&gt;http://www.allmusic.com/search/artist/\1&lt;/url&gt;" dest="3">
			<expression/>
		</RegExp>
	</CreateArtistSearchUrl>
	<GetArtistSearchResults dest="8">
		<RegExp input="$$5" output="&lt;results&gt;\1&lt;/results&gt;" dest="8">
			<RegExp input="$$1" output="&lt;entity&gt;&lt;title&gt;\1&lt;/title&gt;&lt;url cache=&quot;am-$$2-artist.html&quot;&gt;http://www.allmusic.com/artist/\2&lt;/url&gt;&lt;/entity&gt;" dest="9">
				<expression noclean="1">&lt;meta name=&quot;title&quot; content=&quot;([^&quot;]*)&quot;.*?&lt;a href="http://www.allmusic.com/artist/([^/]*)/credits&quot;</expression>
			</RegExp>
			<RegExp input="$$9" output="\1" dest="5">
				<expression noclean="1">(.+)</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;entity&gt;&lt;title&gt;\1&lt;/title&gt;&lt;url cache=&quot;am-$$2-artist.html&quot;&gt;http://www.allmusic.com/artist/\2&lt;/url&gt;&lt;/entity&gt;" dest="9">
				<expression noclean="1">&lt;meta name=&quot;title&quot; content=&quot;([^&quot;]*)&quot;.*?&lt;a href="http://www.allmusic.com/artist/([^/]*)/biography&quot;</expression>
			</RegExp>
			<RegExp input="$$9" output="\1" dest="5">
				<expression noclean="1">(.+)</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;entity&gt;&lt;title&gt;\1&lt;/title&gt;&lt;url cache=&quot;am-$$2-artist.html&quot;&gt;http://www.allmusic.com/artist/\2&lt;/url&gt;&lt;/entity&gt;" dest="9">
				<expression noclean="1">&lt;meta name=&quot;title&quot; content=&quot;([^&quot;]*)&quot;.*?&lt;a href="http://www.allmusic.com/artist/([^/]*)/discography&quot;</expression>
			</RegExp>
			<RegExp input="$$9" output="\1" dest="5">
				<expression noclean="1">(.+)</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;entity&gt;&lt;title&gt;\2&lt;/title&gt;&lt;genre&gt;\3&lt;/genre&gt;&lt;year&gt;\4&lt;/year&gt;&lt;url cache=&quot;am-$$2-artist.html&quot;&gt;http://www.allmusic.com/artist/\1&lt;/url&gt;&lt;/entity&gt;" dest="5+">
				<expression repeat="yes" noclean="1,2">&lt;td&gt;&lt;a href=&quot;http://www.allmusic.com/artist/([^&quot;]*)&quot;&gt;([^&lt;]*)&lt;/a&gt;&lt;/td&gt;[^&gt;]*&gt;([^&lt;]*)&lt;/td&gt;[^&gt;]*&gt;([^&lt;]*)&lt;/td&gt;</expression>
			</RegExp>
			<expression noclean="1"/>
		</RegExp>
	</GetArtistSearchResults>
	<GetArtistDetails dest="3">
		<RegExp input="$$5" output="&lt;details&gt;\1&lt;/details&gt;" dest="3">
			<RegExp input="$$2" conditional="htbthumbs" output="&lt;url cache=&quot;htb-$$2.html&quot; function=&quot;GetHTBThumbs&quot; post=&quot;yes&quot;&gt;http://www.htbackdrops.com/search.php?search_terms=all&amp;amp;search_keywords=\1&lt;/url&gt;" dest="5+">
				<expression/>
			</RegExp>
			<RegExp input="$$1" output="&lt;url cache=&quot;am-$$2-artist.html&quot; function=&quot;ParseAMGArtist&quot;&gt;http://www.allmusic.com/artist/\1&lt;/url&gt;" dest="5+">
				<expression>http://www.allmusic.com/artist/([^&amp;&quot;/]*)</expression>
			</RegExp>
			<RegExp input="$$2" conditional="discogsartistthumbs" output="&lt;url function=&quot;GetDiscogsArtistThumbs&quot; gzip=&quot;yes&quot;&gt;http://www.discogs.com/search?type=artists&amp;q=\1&amp;f=xml&amp;api_key=173f75844f&lt;/url&gt;" dest="5+">
				<expression/>
			</RegExp>
			<RegExp input="$$2" conditional="htbfanart" output="&lt;url cache=&quot;htb-$$2.html&quot; function=&quot;GetHTBFanart&quot; post=&quot;yes&quot;&gt;http://www.htbackdrops.com/search.php?search_terms=all&amp;amp;search_keywords=\1&lt;/url&gt;" dest="5+">
				<expression/>
			</RegExp>
			<RegExp input="$$1" output="&lt;url cache=&quot;am-$$2-biog.html&quot; function=&quot;GetAMGBiography&quot;&gt;http://www.allmusic.com/artist/\1/biography&lt;/url&gt;" dest="5+">
				<expression>&lt;a href=&quot;http://www.allmusic.com/artist/([^/]*)/biography"</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;url cache=&quot;am-$$2-discog.html&quot; function=&quot;GetAMGDiscography&quot;&gt;http://www.allmusic.com/artist/\1/discography&lt;/url&gt;" dest="5+">
				<expression>&lt;a href=&quot;http://www.allmusic.com/artist/([^/]*)/discography"</expression>
			</RegExp>
			<expression noclean="1"/>
		</RegExp>
	</GetArtistDetails>
</scraper>
