<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<scraper framework="1.0" date="2009-06-10" name="OFDb (XML)" content="movies" thumb="ofdb.png" language="de">
	<GetSettings dest="3">
		<RegExp input="$$5" output="&lt;settings&gt;\1&lt;/settings&gt;" dest="3">
			<RegExp input="$$1" output="&lt;setting label=&quot;Fanart&quot; type=&quot;bool&quot; id=&quot;fanart&quot; default=&quot;true&quot;&gt;&lt;/setting&gt;" dest="5+">
				<expression></expression>
			</RegExp>
			<expression noclean="1"></expression>
		</RegExp>
	</GetSettings>

	<NfoUrl dest="3">
		<RegExp input="$$1" output="&lt;url&gt;http://xml.n4rf.net/ofdbgw/movie/\2&lt;/url&gt;" dest="3">
			<expression clear="yes" noclean="1">(http://www.ofdb.de/film/)([0-9]*)</expression>
		</RegExp>
		<RegExp input="$$1" output="&lt;url function=&quot;GetByIMDBId&quot;&gt;http://xml.n4rf.net/ofdbgw/imdb2ofdb/tt\2&lt;/url&gt;" dest="3+">
			<expression>(imdb.com/)Title\?([0-9]+)</expression>
		</RegExp>
		<RegExp input="$$1" output="&lt;url function=&quot;GetByIMDBId&quot;&gt;http://xml.n4rf.net/ofdbgw/imdb2ofdb/tt\2&lt;/url&gt;" dest="3+">
			<expression>(imdb.com/title/tt)([0-9]*)</expression>
		</RegExp>
	</NfoUrl>

	<GetByIMDBId dest="3">
		<RegExp input="$$1" output="&lt;url&gt;http://xml.n4rf.net/ofdbgw/movie/\1&lt;/url&gt;" dest="3+">
			<expression repeat="yes">&lt;ofdbid&gt;([^&lt;]+)</expression>
		</RegExp>
	</GetByIMDBId>

	<CreateSearchUrl dest="3">
		<RegExp input="$$1" output="http://xml.n4rf.net/ofdbgw/search/\1" dest="3">
			<expression noclean="1"/>
		</RegExp>
	</CreateSearchUrl>

	<GetSearchResults dest="8">
		<RegExp input="$$5" output="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot;?&gt;&lt;results&gt;\1&lt;/results&gt;" dest="8">
			<RegExp input="$$1" output="&lt;entity&gt;&lt;title&gt;\2&lt;/title&gt;&lt;year&gt;\3&lt;/year&gt;&lt;url&gt;http://xml.n4rf.net/ofdbgw/movie/\1&lt;/url&gt;&lt;id&gt;\1&lt;/id&gt;&lt;/entity&gt;" dest="5+">
				<expression repeat="yes">&lt;id&gt;(.*?)&lt;/id&gt;\n&lt;titel&gt;([^&lt;]+)&lt;/titel&gt;.*?&lt;jahr&gt;(.*?)&lt;/jahr&gt;</expression>
			</RegExp>
			<expression noclean="1"/>
		</RegExp>
	</GetSearchResults>

        <GetDetails dest="3">
                <RegExp input="$$5" output="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot;?&gt;&lt;details&gt;\1&lt;/details&gt;" dest="3">
		        <RegExp input="$$6" output="\1" dest="5+">
	        	        <RegExp input="$$1" output="&lt;title&gt;\1&lt;/title&gt;" dest="6">
                		        <expression trim="1">&lt;titel&gt;([^&lt;]+)&lt;/titel&gt;</expression>
	        	        </RegExp>
        	        	<RegExp input="$$7" output="&lt;title&gt;\2 \1&lt;/title&gt;" dest="6">
	                        	<RegExp input="$$1" output="\1" dest="7">
						<expression trim="1">&lt;titel&gt;([^&lt;]+)&lt;/titel&gt;</expression>
					</RegExp>
					<expression>(.*), (Die|Der|Das|The)</expression>
        	        	</RegExp>
		                <expression noclean="1"/>
        		</RegExp>
			<RegExp input="$$1" output="&lt;originaltitle&gt;\1&lt;/originaltitle&gt;" dest="5+">
				<expression noclean="1">&lt;alternativ&gt;([^&lt;]+)</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;year&gt;\1&lt;/year&gt;" dest="5+">
				<expression noclean="1">&lt;jahr&gt;([^&lt;]+)</expression>
			</RegExp>
			<RegExp input="$$9" output="&lt;director&gt;\1&lt;/director&gt;" dest="5+">
				<RegExp input="$$1" output="\1" dest="9">
					<expression noclean="1">&lt;regie&gt;(.*?)&lt;/regie&gt;</expression>
				</RegExp>
				<expression repeat="yes">&lt;name&gt;([^&lt;]+)</expression>
			</RegExp>
			<RegExp input="$$9" output="&lt;genre&gt;\1&lt;/genre&gt;" dest="5+">
				<RegExp input="$$1" output="\1" dest="9">
					<expression noclean="1">&lt;genre&gt;(.*?)&lt;/genre&gt;</expression>
				</RegExp>
				<expression repeat="yes">&lt;titel&gt;([^&lt;]+)</expression>
			</RegExp>
			<RegExp input="$$9" output="&lt;credits&gt;\1&lt;/credits&gt;" dest="5+">
				<RegExp input="$$1" output="\1" dest="9">
					<expression noclean="1">&lt;drehbuch&gt;(.*?)&lt;/drehbuch&gt;</expression>
				</RegExp>
				<expression repeat="yes">&lt;name&gt;([^&lt;]+)</expression>
			</RegExp>
			<RegExp input="$$9" output="&lt;actor&gt;&lt;name&gt;\2&lt;/name&gt;&lt;role&gt;\3&lt;/role&gt;&lt;/actor&gt;" dest="5+">
				<RegExp input="$$1" output="\1" dest="9">
					<expression noclean="1">&lt;besetzung&gt;(.*?)&lt;/besetzung&gt;</expression>
				</RegExp>
				<expression repeat="yes">&lt;id&gt;([^&lt;]+)&lt;/id&gt;\n&lt;name&gt;([^&lt;]+)&lt;/name&gt;\n&lt;rolle&gt;([^&lt;]+)</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;outline&gt;\1&lt;/outline&gt;" dest="5+">
				<expression>&lt;kurzbeschreibung&gt;([^&lt;]+)</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;plot&gt;\1&lt;/plot&gt;" dest="5+">
				<expression>&lt;beschreibung&gt;([^&lt;]+)</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;rating&gt;\1&lt;/rating&gt;" dest="5+">
				<expression>&lt;note&gt;([^&lt;]+)</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;votes&gt;\1&lt;/votes&gt;" dest="5+">
				<expression>&lt;stimmen&gt;([^&lt;]+)</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;url function=&quot;GetOFDBData&quot;&gt;http://xml.n4rf.net/ofdbgw/fassung/\1&lt;/url&gt;" dest="5+">
				<expression>&lt;fassungen&gt;.*?&lt;id&gt;([^&lt;]+)</expression>
			</RegExp>
			<RegExp input="$$1" output="&lt;thumbs&gt;&lt;thumb&gt;\1&lt;/thumb&gt;&lt;/thumbs&gt;" dest="5+">
				<expression>&lt;bild&gt;([^&lt;]+)</expression>
			</RegExp>
			<RegExp conditional="fanart" input="$$1" output="&lt;url function=&quot;GetTMDBId&quot;&gt;http://api.themoviedb.org/2.0/Movie.imdbLookup?imdb_id=tt\1&amp;amp;api_key=57983e31fb435df4df77afb854740ea9&lt;/url&gt;" dest="5+">
				<expression>&lt;imdbid&gt;([^&lt;]+)</expression>
			</RegExp>
			<expression noclean="1"/>
		</RegExp>
	</GetDetails>

	<GetOFDBData dest="5">
	        <RegExp input="$$6" output="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;yes&quot;?&gt;&lt;details&gt;\1&lt;/details&gt;" dest="5+">
       	        	<RegExp input="$$1" output="&lt;studio&gt;\1&lt;/studio&gt;" dest="6+">
				<expression trim="1">&lt;label&gt;([^&lt;|^(]*)</expression>
       	        	</RegExp>
        	        <RegExp input="$$1" output="&lt;mpaa&gt;\1&lt;/mpaa&gt;" dest="6+">
               		        <expression trim="1">&lt;freigabe&gt;([^&lt;]+)</expression>
        	        </RegExp>
        	        <RegExp input="$$1" output="&lt;runtime&gt;\1&lt;/runtime&gt;" dest="6+">
               		        <expression trim="1">&lt;laufzeit&gt;([^&lt;]+)</expression>
        	        </RegExp>
	                <expression noclean="1"/>
       		</RegExp>
	</GetOFDBData>
  
	<GetTMDBId dest="5">
                <RegExp conditional="fanart" input="$$1" output="&lt;details&gt;&lt;url function=&quot;GetTMDBFanart&quot;&gt;http://api.themoviedb.org/2.0/Movie.getInfo?id=\1&amp;amp;api_key=57983e31fb435df4df77afb854740ea9&lt;/url&gt;&lt;/details&gt;" dest="5+">
                        <expression>&lt;id&gt;([0-9]*)&lt;/id&gt;</expression>
                </RegExp>
        </GetTMDBId>

        <GetTMDBFanart dest="5">
                <RegExp input="$$2" output="&lt;details&gt;&lt;fanart url=&quot;http://themoviedb.org/image/backdrops&quot;&gt;\1&lt;/fanart&gt;&lt;/details&gt;" dest="5+">
                        <RegExp input="$$1" output="&lt;thumb preview=&quot;/\1/\2_poster.\3&quot;&gt;/\1/\2.\3&lt;/thumb&gt;" dest="2">
                                <expression repeat="yes">&lt;backdrop size=&quot;original&quot;&gt;.*?/([0-9]+)/([^\.]+)\.([^&lt;]*)&lt;/backdrop&gt;</expression>
                        </RegExp>
                        <expression noclean="1">(.+)</expression>
                </RegExp>
        </GetTMDBFanart>
</scraper>
