<?xml version="1.0" encoding="UTF-8"?>
<scraper framework="1.1" date="2009-09-30" name="theaudiodb.com" content="albums" thumb="tadb" language="en">
	<include>common/tadb.xml</include>
	<CreateAlbumSearchUrl dest="3">
		<RegExp input="$$1" output="&lt;url cache=&quot;tadb-\1-album.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/searchalbum.php?s=$$4&a=\1&lt;/url&gt;" dest="3">
			<RegExp input="$$2" output="\1" dest="4">
				<expression noclean="1">(.+)</expression>
			</RegExp>
			<RegExp input="$$2" output="\1" dest="6">
				<expression noclean="1">(.+)(?:%20Ft%2e|%20Feat%2e|%20Ft\.|%20Feat\.|%20and%20)</expression>
			</RegExp>
			<RegExp input="$$6" output="\1" dest="4">
				<expression>(.+)</expression>
			</RegExp>
			<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;tadb-\3-album.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?m=\1&lt;/url&gt;&lt;/entity&gt;" dest="5">
				<expression repeat="yes">&quot;idAlbum&quot;:&quot;([^&quot;]*)&quot;,&quot;idArtist&quot;:&quot;[^&quot;]*&quot;,&quot;strAlbum&quot;:&quot;([^&quot;]*)&quot;,&quot;strArtist&quot;:&quot;([^&quot;]*)&quot;,&quot;intYearReleased&quot;:&quot;([^&quot;]*)&quot;</expression>
			</RegExp>
			<expression noclean="1" />
		</RegExp>
	</GetAlbumSearchResults>
	<GetAlbumDetails dest="3">
		<RegExp input="$$5" output="&lt;details&gt;\1&lt;/details&gt;" dest="3">
			<!--TADBID - Album-->
			<RegExp input="$$1" output="\1" dest="3">
				<expression noclean="1">idAlbum&quot;:&quot;([^&quot;]*)</expression>
			</RegExp>
			<!--MBID - release group-->
			<RegExp input="$$1" output="\1" dest="4">
				<expression noclean="1">strMusicBrainzID&quot;:&quot;([^&quot;]*)</expression>
			</RegExp>
			<RegExp input="$$3" output="&lt;url function=&quot;ParseTADBAlbumTitle&quot; cache=&quot;tadb-\1-album.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?m=\1&lt;/url&gt;" dest="5+">
				<expression noclean="1">(.+)</expression>
			</RegExp>
			<RegExp input="$$3" output="&lt;url function=&quot;ParseTADBAlbumArtist&quot; cache=&quot;tadb-\1-album.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?m=\1&lt;/url&gt;" dest="5+">
				<expression noclean="1">(.+)</expression>
			</RegExp>
			<RegExp input="$$3" output="&lt;url function=&quot;ParseTADBAlbumDate&quot; cache=&quot;tadb-\1-album.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?m=\1&lt;/url&gt;" dest="5+">
				<expression noclean="1">(.+)</expression>
			</RegExp>
			<RegExp input="$$3" output="&lt;url function=&quot;ParseTADBAlbumGenres&quot; cache=&quot;tadb-\1-album.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album-mb.php?i=\1&lt;/url&gt;" dest="5+">
				<expression noclean="1">(.+)</expression>
			</RegExp>
			<RegExp input="$$3" output="&lt;url function=&quot;ParseTADBAlbumTracks&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/track.php?m=\1&lt;/url&gt;" dest="5+">
				<expression noclean="1">(.+)</expression>
			</RegExp>
			<RegExp input="$$3" output="&lt;url function=&quot;ParseTADBAlbumReview&quot; cache=&quot;tadb-\1-album.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?m=\1&lt;/url&gt;" dest="5+">
				<expression noclean="1">(.+)</expression>
			</RegExp>
			<RegExp input="$$3" output="&lt;url function=&quot;ParseTADBAlbumThumbs&quot; cache=&quot;tadb-\1-album.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?m=\1&lt;/url&gt;" dest="5+">
				<expression noclean="1">(.+)</expression>
			</RegExp>
<!--
			<RegExp conditional="fanarttvalbumthumbs" input="$$1" output="&lt;chain function=&quot;GetFanartTvAlbumThumbsByMBID&quot;&gt;$$4&lt;/chain&gt;" dest="5+">
				<expression noclean="1" />
			</RegExp>
-->
			<expression noclean="1" />
		</RegExp>
	</GetAlbumDetails>
	<CreateArtistSearchUrl dest="3">
		<RegExp input="$$1" output="&lt;url&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/search.php?s=$$4&lt;/url&gt;" dest="3">
			<RegExp input="$$1" output="\1" dest="4">
				<expression noclean="1">(.+)</expression>
			</RegExp>
			<RegExp input="$$1" output="\1" dest="6">
				<expression noclean="1">(.+)(?:%20Ft%2e|%20Feat%2e|%20Ft\.|%20Feat\.|%20and%20)</expression>
			</RegExp>
			<RegExp input="$$6" output="\1" dest="4">
				<expression>(.+)</expression>
			</RegExp>
			<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;\2&lt;/title&gt;&lt;url cache=&quot;tadb-\1-artist.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/artist.php?i=\1&lt;/url&gt;&lt;/entity&gt;" dest="9">
				<expression repeat="yes" noclean="1">idArtist&quot;:&quot;([^&quot;]*)&quot;,&quot;strArtist&quot;:&quot;([^&quot;]*)</expression>
			</RegExp>
			<RegExp input="$$9" output="\1" dest="5">
				<expression noclean="1">(.+)</expression>
			</RegExp>
			<expression noclean="1"/>
		</RegExp>
	</GetArtistSearchResults>
	<GetArtistDetails dest="3" clearbuffers="no">
		<RegExp input="$$5" output="&lt;details&gt;\1&lt;/details&gt;" dest="3">
			<!--MBID - Artist-->
			<RegExp input="$$1" output="\1" dest="8">
				<expression noclean="1">strMusicBrainzID&quot;:&quot;([^&quot;]*)</expression>
			</RegExp>
			<!--TADBID - Artist-->
			<RegExp input="$$1" output="\1" dest="9">
				<expression noclean="1">idArtist&quot;:&quot;([^&quot;]*)</expression>
			</RegExp>
<!--
			<RegExp input="$$8" conditional="fanarttvthumbs" output="&lt;chain function=&quot;GetFanartTvArtistThumbsByMBID&quot;&gt;\1&lt;/chain&gt;" dest="5+">
				<expression/>
			</RegExp>
			<RegExp input="$$8" conditional="fanarttvfanart" output="&lt;chain function=&quot;GetFanartTvArtistFanartsByMBID&quot;&gt;\1&lt;/chain&gt;" dest="5+">
				<expression/>
			</RegExp>
-->
			<RegExp input="$$9" output="&lt;url function=&quot;ParseTADBArtistThumbs&quot; cache=&quot;tadb-\1-artist.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/artist.php?i=\1&lt;/url&gt;" dest="5+">
				<expression/>
			</RegExp>
			<RegExp input="$$9" output="&lt;url function=&quot;ParseTADBArtistFanarts&quot; cache=&quot;tadb-\1-artist.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/artist.php?i=\1&lt;/url&gt;;" dest="5+">
				<expression/>
			</RegExp>
			<RegExp input="$$9" output="&lt;url function=&quot;ParseTADBBiography&quot; cache=&quot;tadb-\1-artist.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/artist.php?i=\1&lt;/url&gt;" dest="5+">
				<expression/>
			</RegExp>
			<RegExp input="$$9" output="&lt;url function=&quot;ParseTADBLifeSpan&quot; cache=&quot;tadb-\1-artist.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/artist.php?i=\1&lt;/url&gt;" dest="5+">
				<expression/>
			</RegExp>
			<RegExp input="$$9" output="&lt;url function=&quot;ParseTADBArtistGenres&quot; cache=&quot;tadb-\1-artist.json&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/artist.php?i=\1&lt;/url&gt;" dest="5+">
				<expression/>
			</RegExp>
			<RegExp input="$$9" output="&lt;url function=&quot;ParseTADBDiscography&quot;&gt;http://www.theaudiodb.com/api/v1/json/58424d43204d6564696120/album.php?i=\1&lt;/url&gt;" dest="5+">
				<expression/>
			</RegExp>
			<expression noclean="1"/>
		</RegExp>
	</GetArtistDetails>
</scraper>
