<?xml version="1.0" encoding="UTF-8"?>
<scraper framework="1.1" date="2010-02-19" name="allmusic &amp; merlin.pl &amp; lastfm.pl" content="albums" thumb="allmusic.png" language="pl">
	<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;Pobieraj Fanarty&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;Biografia z Last.fm.pl, opis płyty z Merlin.pl&quot; type=&quot;bool&quot; id=&quot;merlin&quot; default=&quot;true&quot;&gt;&lt;/setting&gt;" dest="5+">
				<expression></expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;setting label=&quot;Zdjęcia artysty z 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;Okładka albumu z 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;Zdjęcia artysty z 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;Okładka albumu z 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;Zdjęcia artysty z 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="http://www.\1" dest="3">
			<expression>(allmusic.com/cg/.*)</expression>
		</RegExp>
	</NfoUrl>
	<CreateAlbumSearchUrl dest="3">
		<RegExp input="$$1" output="&lt;url post=&quot;yes&quot;&gt;http://www.allmusic.com/cg/amg.dll?P=amg&amp;amp;SQL=\1&amp;amp;OPT1=2&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;title&gt;\1&lt;/title&gt;&lt;/entity&gt;" dest="5">
				<expression repeat="yes" noclean="1">&lt;TITLE&gt;allmusic[ (]+ ([^&gt;]*) &gt; Overview</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;entity&gt;&lt;year&gt;\1&lt;/year&gt;&lt;artist&gt;\2&lt;/artist&gt;&lt;title&gt;\4&lt;/title&gt;&lt;url cache=&quot;am-\2-\4-album.html&quot;&gt;http://www.allmusic.com/cg/amg.dll?p=amg&amp;amp;SQL=\3&lt;/url&gt;&lt;/entity&gt;" dest="5+">
				<expression repeat="yes" noclean="1,2,3">&gt;([0-9]+)&lt;/.*?&gt;([a-zA-Z0-9].*?)&lt;.*?sql=([0-9:a-z]*)&quot;&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="&lt;url cache=&quot;am-$$2-album.html&quot; function=&quot;ParseAMGAlbum&quot;&gt;http://www.allmusic.com/cg/amg.dll?p=amg&amp;amp;sql=\1&lt;/url&gt;" dest="5+">
				<expression noclean="1">sql=([^&quot;]*)&quot;&gt;Overview</expression>

			</RegExp>
			<RegExp input="$$1" conditional="!merlin" output="&lt;url cache=&quot;am-$$2-album.html&quot; function=&quot;GetAMGReview&quot;&gt;http://www.allmusic.com/cg/amg.dll?p=amg&amp;amp;sql=\1&lt;/url&gt;" dest="5+">
				<expression noclean="1">sql=([^&quot;]*)&quot;&gt;Review</expression>
			</RegExp>
			<RegExp input="$$1" conditional="merlin" output="&lt;url function=&quot;MerlinLink&quot;&gt;http://merlin.pl/xbmc/browse/search/4,,1.html?phrase=&amp;amp;place=4+simple&amp;amp;carrier=3&amp;amp;offer=O&amp;amp;category=&amp;amp;title=\1&amp;amp;person=\2&amp;amp;firm=&amp;amp;date=&amp;amp;isbn=&amp;amp;sort=rank&amp;amp;x=40&amp;amp;y=12&lt;/url&gt;" dest="5+">
				<expression trim="1,2" encode="1,2">&lt;span class=&quot;title&quot;&gt;[ ]*([^&lt;]*)&lt;/span&gt;.*&lt;a href=&quot;[^&quot;]+&quot; class=&quot;subtitle&quot;&gt;[ ]*([^&lt;]*)&lt;/a&gt;</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;span class=&quot;title&quot;&gt;[ ]*([^&lt;]*)&lt;/span&gt;.*&lt;a href=&quot;[^&quot;]+&quot; class=&quot;subtitle&quot;&gt;[ ]*([^&lt;]*)&lt;/a&gt;</expression>

			</RegExp>
			<expression noclean="1"/>
		</RegExp>
	</GetAlbumDetails>
	<CreateArtistSearchUrl dest="3">
		<RegExp input="$$1" output="&lt;url post=&quot;yes&quot;&gt;http://www.allmusic.com/cg/amg.dll?P=amg&amp;amp;SQL=\1&amp;amp;OPT1=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;/entity&gt;" dest="5">
				<expression repeat="yes" noclean="1">&lt;TITLE&gt;allmusic[ (]+ ([^&gt;]*) &gt; Overview</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;\5&lt;/year&gt;&lt;url&gt;http://www.allmusic.com/cg/amg.dll?p=amg&amp;amp;SQL=\1&lt;/url&gt;&lt;/entity&gt;" dest="5+">

				<expression repeat="yes" noclean="1,2">style=&quot;[^=]*&lt;a href=&quot;[^&quot;]*sql=([^&quot;]*)&quot;&gt;([^&lt;]*)&lt;/a&gt;[^-]*[^&gt;]*&gt;([^&lt;]*)&lt;/TD&gt;[^&gt;]*&gt;(&amp;nbsp;)?([^&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="$$1" output="&lt;url cache=&quot;am-$$2-artist.html&quot; function=&quot;ParseAMGArtist&quot;&gt;http://www.allmusic.com/cg/amg.dll?p=amg&amp;amp;sql=\1&lt;/url&gt;" dest="5">
				<expression noclean="1">sql=([^&quot;]*)&quot;&gt;Biography</expression>

			</RegExp>
			<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="$$2" conditional="lastfmartistthumbs" output="&lt;url function=&quot;GetLastFMArtistThumbs&quot;&gt;http://ws.audioscrobbler.com/2.0/?method=artist.getimages&amp;amp;artist=\1&amp;amp;api_key=71e468a84c1f40d4991ddccc46e40f1b&lt;/url&gt;" dest="5+">
				<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" conditional="!merlin" output="&lt;url cache=&quot;am-$$2-artist.html&quot; function=&quot;GetAMGBiography&quot;&gt;http://www.allmusic.com/cg/amg.dll?p=amg&amp;amp;sql=\1&lt;/url&gt;" dest="5+">
				<expression noclean="1">sql=([^&quot;]*)&quot;&gt;Biography</expression>
			</RegExp>

			<RegExp input="$$2" conditional="merlin" output="&lt;url function=&quot;GetLastFMBiography&quot;&gt;http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&amp;amp;artist=\1&amp;amp;lang=pl&amp;amp;api_key=71e468a84c1f40d4991ddccc46e40f1b&lt;/url&gt;" dest="5+">
				<expression noclean="1"></expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;url cache=&quot;am-$$2-discog.html&quot; function=&quot;GetAMGDiscography&quot;&gt;http://www.allmusic.com/cg/amg.dll?p=amg&amp;amp;sql=\1&lt;/url&gt;" dest="5+">
				<expression noclean="1">sql=([^&quot;]*)&quot;&gt;Discography</expression>
			</RegExp>
			<expression noclean="1"/>

		</RegExp>
	</GetArtistDetails>
	<GetLastFMBiography dest="5">
		<RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
			<RegExp input="$$1" output="&lt;biography&gt;\1&lt;/biography&gt;" dest="2+">
				<expression>&lt;content&gt;&lt;!\[CDATA\[(.*?)\]</expression>
			</RegExp>
			<expression noclean="1"/>

		</RegExp>
	</GetLastFMBiography>
	<MerlinLink dest="5">
		<RegExp input="$$2" output="&lt;details&gt;\1&lt;/details&gt;" dest="5">
			<RegExp input="$$1" output="&lt;url function=&quot;GetMerlinReview&quot;&gt;http://merlin.pl\1&lt;/url&gt;" dest="2">
				<expression>Liczba towar[^f]+f=&quot;([^&quot;]+)</expression>
			</RegExp>

			<expression noclean="1"/>
		</RegExp>
	</MerlinLink>
	<GetMerlinReview dest="5">
		<RegExp input="$$2" output="&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-2&quot; standalone=&quot;yes&quot;?&gt;&lt;details&gt;&lt;review&gt;\1&lt;/review&gt;&lt;/details&gt;" dest="5">
			<RegExp input="$$1" output="\1" dest="2">
				<expression>class=&quot;productDesc&quot;&gt;(.*?)&lt;/div&gt;</expression>

			</RegExp>
			<RegExp input="$$1" output="\1" dest="2+">
				<expression>piorka_merlina.*?contents&quot;&gt;([^&lt;]*)&lt;</expression>
			</RegExp>
			<RegExp input="$$1" output="\1" dest="2+">
				<expression>contents&quot;&gt;([^&lt;]*)&lt;</expression>

			</RegExp>
			<expression noclean="1"/>
		</RegExp>
	</GetMerlinReview>
</scraper>
