PageRenderTime 53ms CodeModel.GetById 29ms app.highlight 15ms RepoModel.GetById 1ms app.codeStats 0ms

/Assets/scrapers/metadata.tvdb.com/tvdb.xml

#
XML | 358 lines | 328 code | 8 blank | 22 comment | 0 complexity | 3cf8e36347476d5a0ac9b1e0b08493ec MD5 | raw file
  1<?xml version="1.0" encoding="UTF-8"?>
  2<!-- should be self-explanatory -->
  3<scraper framework="1.1" date="2013-04-04">
  4	<NfoUrl dest="3">
  5		<RegExp input="$$1" output="&lt;url cache=&quot;\1-$INFO[language].xml&quot;&gt;http://thetvdb.com/api/1D62F2F90030C444/series/\1/all/$INFO[language].zip&lt;/url&gt;&lt;id&gt;\1&lt;/id&gt;" dest="3">
  6			<expression>http://(?:www\.)?thetvdb.com/(?:index\.php)?\?tab=series&amp;id=([0-9]+)</expression>
  7		</RegExp>
  8		<RegExp input="$$1" output="&lt;details&gt;&lt;url cache=&quot;tt\1.xml&quot; function=&quot;GetTVDBId&quot;&gt;http://thetvdb.com/api/GetSeriesByRemoteID.php?imdbid=tt\1&amp;amp;language=$INFO[language]&lt;/url&gt;&lt;/details&gt;" dest="3+">
  9			<expression>imdb....?/title/tt([0-9]*)</expression>
 10		</RegExp>
 11		<RegExp input="$$1" output="&lt;details&gt;&lt;url cache=&quot;tt\1.xml&quot; function=&quot;GetTVDBId&quot;&gt;http://thetvdb.com/api/GetSeriesByRemoteID.php?imdbid=tt\1&amp;amp;language=$INFO[language]&lt;/url&gt;&lt;/details&gt;" dest="3+">
 12			<expression>imdb....?/Title\?([0-9]*)</expression>
 13		</RegExp>
 14	</NfoUrl>
 15
 16	<GetTVDBId dest="3">
 17		<RegExp input="$$1" output="&lt;details&gt;&lt;url cache=&quot;\1-$INFO[language].xml&quot;&gt;http://thetvdb.com/api/1D62F2F90030C444/series/\1/all/$INFO[language].zip&lt;/url&gt;&lt;id&gt;\1&lt;/id&gt;&lt;/details&gt;" dest="3">
 18			<expression>&lt;seriesid&gt;([0-9]*)&lt;/seriesid&gt;</expression>
 19		</RegExp>
 20	</GetTVDBId>
 21
 22	<EpisodeGuideUrl dest="3">
 23		<RegExp input="$$1" output="\1" dest="3">
 24			<expression>(.*?http://www.thetvdb.com.*)</expression>
 25		</RegExp>
 26		<RegExp input="$$1" output="\1" dest="3">
 27			<expression>(.*?http://thetvdb.com.*)</expression>
 28		</RegExp>
 29	</EpisodeGuideUrl>
 30
 31	<!-- input:	$1=query string -->
 32	<!-- returns:	the url we should use to do the search -->
 33	<CreateSearchUrl dest="3">
 34		<RegExp input="$$1" output="&lt;url cache=&quot;cache-\1$$4-$INFO[language].xml&quot;&gt;http://thetvdb.com/api/GetSeries.php?seriesname=\1$$4&amp;amp;language=$INFO[language]&lt;/url&gt;" dest="3">
 35			<RegExp input="$$2" output="%20(\1)" dest="4">
 36				<expression clear="yes">(.+)</expression>
 37			</RegExp>
 38			<expression/>
 39		</RegExp>
 40	</CreateSearchUrl>
 41
 42	<!-- input:	$1=html $2=search query -->
 43	<!-- returns:	results in xml format <results><movie><title>*</title><url>*</url>*#urls<extra>*</extra></movie>*</results> -->
 44	<GetSearchResults dest="1">
 45		<RegExp input="$$4" 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="1">
 46			<RegExp input="$$1" output="&lt;entity&gt;&lt;title&gt;\3&lt;/title&gt;&lt;language&gt;\2&lt;/language&gt;&lt;url cache=&quot;\1-$INFO[language].xml&quot;&gt;http://thetvdb.com/api/1D62F2F90030C444/series/\1/all/$INFO[language].zip&lt;/url&gt;&lt;id&gt;\1&lt;/id&gt;&lt;/entity&gt;" dest="4">
 47				<expression repeat="yes">&lt;seriesid&gt;([0-9]*)&lt;/seriesid&gt;[^&lt;]*&lt;language&gt;([^&lt;]*)&lt;/language&gt;[^&lt;]*&lt;SeriesName&gt;([^&lt;]*)&lt;/SeriesName&gt;</expression>
 48			</RegExp>
 49			<expression noclean="1"/>
 50		</RegExp>
 51	</GetSearchResults>
 52
 53	<!-- input:	$1..#urls=html -->
 54	<!-- input:	$(#urls+1): extra !-->
 55	<!-- returns:	results in xml format <details><plot>*</plot><director>*</director><premiered>*</premiered><episodeguide>*</episodeguide></details> -->
 56	<GetDetails dest="7">
 57		<RegExp input="$$4" 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="7">
 58			<RegExp input="$$1" output="\1" dest="5">
 59				<expression noclean="1">&lt;Series&gt;.*?&lt;id&gt;$$2&lt;/id&gt;(.*)</expression>
 60			</RegExp>
 61			<RegExp input="$$5" output="&lt;plot&gt;\1&lt;/plot&gt;" dest="4">
 62				<expression noclean="1">&lt;Overview&gt;([^&lt;]*)&lt;/Overview&gt;</expression>
 63			</RegExp>
 64			<RegExp input="$$2" output="&lt;id&gt;\1&lt;/id&gt;" dest="4+">
 65				<expression/>
 66			</RegExp>
 67			<RegExp input="$$1" output="&lt;mpaa&gt;\1&lt;/mpaa&gt;" dest="4+">
 68				<expression>&lt;ContentRating&gt;([^&lt;]*)&lt;/ContentRating&gt;</expression>
 69			</RegExp>
 70			<RegExp input="$$5" output="&lt;premiered&gt;\1&lt;/premiered&gt;" dest="4+">
 71				<expression>&lt;FirstAired&gt;([^&lt;]*)&lt;/FirstAired&gt;</expression>
 72			</RegExp>
 73			<RegExp input="$$5" output="&lt;runtime&gt;\1&lt;/runtime&gt;" dest="4+"> 
 74				<expression>&lt;Runtime&gt;([^&lt;]+)&lt;/Runtime&gt;</expression> 
 75			</RegExp>
 76			<RegExp input="$INFO[RatingS]" output="$$12" dest="4+">
 77				<RegExp input="$$5" output="&lt;rating&gt;\1&lt;/rating&gt;" dest="12+">
 78					<expression>&lt;Rating&gt;([^&lt;]+)&lt;/Rating&gt;</expression>
 79				</RegExp>
 80				<RegExp input="$$5" output="&lt;votes&gt;\1&lt;/votes&gt;" dest="12+">
 81					<expression>&lt;RatingCount&gt;([^&lt;]+)&lt;/RatingCount&gt;</expression>
 82				</RegExp>
 83				<expression>TheTVDB</expression>
 84			</RegExp>
 85			<RegExp input="$INFO[RatingS]" output="$$13" dest="4+">
 86				<RegExp input="$$5" output="\1" dest="11">
 87					<expression clear="yes">&lt;IMDB_ID&gt;([^&lt;]+)&lt;/IMDB_ID&gt;</expression>
 88				</RegExp>
 89				<RegExp input="$$11" output="\1" dest="13">
 90					<RegExp conditional="fallback" input="$$5" output="&lt;rating&gt;\1&lt;/rating&gt;" dest="13+">
 91						<expression>&lt;Rating&gt;([^&lt;]+)&lt;/Rating&gt;</expression>
 92					</RegExp>
 93					<RegExp conditional="fallback" input="$$5" output="&lt;votes&gt;\1&lt;/votes&gt;" dest="13+">
 94						<expression>&lt;RatingCount&gt;([^&lt;]+)&lt;/RatingCount&gt;</expression>
 95					</RegExp>
 96					<expression>^$</expression>
 97				</RegExp>
 98				<RegExp input="$$11" output="&lt;chain function=&quot;GetIMDBRatingById&quot;&gt;$$11&lt;/chain&gt;" dest="13">
 99					<expression>(.+)</expression>
100				</RegExp>
101				<expression>IMDb</expression>
102			</RegExp>			
103			<RegExp input="$$5" output="&lt;studio&gt;\1&lt;/studio&gt;" dest="4+">
104				<expression>&lt;Network&gt;([^&lt;]*)&lt;/Network&gt;</expression>
105			</RegExp>
106			<RegExp input="$$5" output="&lt;title&gt;\1&lt;/title&gt;" dest="4+">
107				<expression>&lt;SeriesName&gt;([^&lt;]*)&lt;/SeriesName&gt;</expression>
108			</RegExp>
109			<RegExp input="$$5" output="\1" dest="10">
110				<expression noclean="1">&lt;Genre&gt;([^&lt;]*)&lt;/Genre&gt;</expression>
111			</RegExp>
112			<RegExp input="$$10" output="&lt;genre&gt;\1&lt;/genre&gt;" dest="4+">
113				<expression repeat="yes">([^\|]*)\|</expression>
114			</RegExp>
115			<RegExp input="$$10" output="&lt;genre&gt;\1&lt;/genre&gt;" dest="4+">
116				<expression repeat="yes">([^,]*),</expression>
117			</RegExp>
118			<RegExp input="$$10" output="&lt;genre&gt;\1&lt;/genre&gt;" dest="4+">
119				<expression>([^\|,]+)$</expression>
120			</RegExp>
121			<!-- actors with thumbs -->
122			<RegExp input="$$5" output="&lt;actor&gt;&lt;name&gt;\2&lt;/name&gt;&lt;role&gt;\3&lt;/role&gt;&lt;thumb&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;&lt;/actor&gt;" dest="4+">
123				<expression repeat="yes" noclean="1,2,3">&lt;Actor&gt;.*?&lt;Image&gt;([^&lt;]+)&lt;/Image&gt;.*?&lt;Name&gt;([^&lt;]*)&lt;/Name&gt;.*?&lt;Role&gt;([^&lt;]*)</expression>
124			</RegExp>
125			<!-- actors without thumbs -->
126			<RegExp input="$$5" output="&lt;actor&gt;&lt;name&gt;\2&lt;/name&gt;&lt;role&gt;\3&lt;/role&gt;&lt;/actor&gt;" dest="4+">
127				<expression repeat="yes" noclean="1,2,3">&lt;Actor&gt;.*?&lt;Image&gt;([^&lt;]*)&lt;/Image&gt;.*?&lt;Name&gt;([^&lt;]*)&lt;/Name&gt;.*?&lt;Role&gt;([^&lt;]*)</expression>
128			</RegExp>
129			<RegExp input="$$2" output="&lt;chain function=&quot;GetArt&quot;&gt;\1&lt;/chain&gt;" dest="4+">
130				<expression/>
131			</RegExp>
132			<RegExp input="$$3" output="\1" dest="6">
133				<expression>.*/(.*).zip</expression>
134			</RegExp>
135			<RegExp input="$$3" output="&lt;episodeguide&gt;&lt;url cache=&quot;$$2-$$6.xml&quot;&gt;\1&lt;/url&gt;&lt;/episodeguide&gt;" dest="4+">
136				<expression/>
137			</RegExp>
138			<expression noclean="1"/>
139		</RegExp>
140	</GetDetails>
141
142	<GetArt dest="3">
143		<RegExp input="$$4" output="&lt;details&gt;\1&lt;/details&gt;" dest="3">
144			<RegExp input="$$1" output="&lt;url function=&quot;ParseArt&quot; cache=&quot;\1-$INFO[language].xml&quot;&gt;http://thetvdb.com/api/1D62F2F90030C444/series/\1/banners.xml&lt;/url&gt;" dest="4">
145				<expression/>
146			</RegExp>
147			<expression noclean="1"/>
148		</RegExp>
149	</GetArt>
150	<ParseArt dest="3">
151		<RegExp input="$$4" output="&lt;details&gt;\1&lt;/details&gt;" dest="3">
152			<RegExp input="$$1" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4">
153				<expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;graphical&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;</expression>
154			</RegExp>
155			<RegExp input="$$1" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
156				<expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;graphical&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;</expression>
157			</RegExp>
158			<RegExp input="$$1" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
159				<expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;text&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;</expression>
160			</RegExp>
161			<RegExp input="$$1" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
162				<expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;text&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;</expression>
163			</RegExp>
164			<RegExp input="$$1" output="&lt;thumb aspect=&quot;banner&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
165				<expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;series&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;blank&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;&lt;/Language&gt;</expression>
166			</RegExp>
167			<RegExp input="$$1" output="&lt;thumb aspect=&quot;poster&quot; type=&quot;season&quot; season=&quot;\2&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
168				<expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;season&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;season&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;[^&lt;]*[^S]*Season&gt;([0-9]+)&lt;/Season&gt;</expression>
169			</RegExp>
170			<RegExp input="$$1" output="&lt;thumb aspect=&quot;poster&quot; type=&quot;season&quot; season=&quot;\3&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
171				<expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;season&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;season&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;[^&lt;]*[^S]*Season&gt;([0-9]+)&lt;/Season&gt;</expression>
172			</RegExp>
173			<RegExp input="$$1" output="&lt;thumb aspect=&quot;banner&quot; type=&quot;season&quot; season=&quot;\2&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
174				<expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;season&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;seasonwide&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;[^&lt;]*[^S]*Season&gt;([0-9]+)&lt;/Season&gt;</expression>
175			</RegExp>
176			<RegExp input="$$1" output="&lt;thumb aspect=&quot;banner&quot; type=&quot;season&quot; season=&quot;\3&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
177				<expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;season&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;seasonwide&lt;/BannerType2&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;[^&lt;]*[^S]*Season&gt;([0-9]+)&lt;/Season&gt;</expression>
178			</RegExp>
179			<RegExp input="$$1" output="&lt;thumb aspect=&quot;poster&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
180				<expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;poster&lt;/BannerType&gt;</expression>
181			</RegExp>
182			<RegExp input="$$1" output="&lt;thumb aspect=&quot;poster&quot; type=&quot;season&quot; season=&quot;-1&quot;&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
183				<expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;poster&lt;/BannerType&gt;</expression>
184			</RegExp>
185			<RegExp conditional="fanart" input="$$5" output="&lt;fanart url=&quot;http://thetvdb.com/banners/&quot;&gt;\1&lt;/fanart&gt;" dest="4+">
186				<RegExp input="$$1" output="&lt;thumb dim=&quot;\2&quot; colors=&quot;\3&quot; preview=&quot;_cache/\1&quot;&gt;\1&lt;/thumb&gt;" dest="5">
187					<expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;fanart&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;([^&lt;]*)&lt;/BannerType2&gt;[^&lt;]*&lt;Colors&gt;([^&lt;]*)&lt;/Colors&gt;[^&lt;]*&lt;Language&gt;$INFO[language]&lt;/Language&gt;</expression>
188				</RegExp>
189				<RegExp input="$$1" output="&lt;thumb dim=&quot;\2&quot; colors=&quot;\3&quot; preview=&quot;_cache/\1&quot;&gt;\1&lt;/thumb&gt;" dest="5+">
190					<expression repeat="yes">&lt;BannerPath&gt;([^&lt;]*)&lt;/BannerPath&gt;[^&lt;]*&lt;BannerType&gt;fanart&lt;/BannerType&gt;[^&lt;]*&lt;BannerType2&gt;([^&lt;]*)&lt;/BannerType2&gt;[^&lt;]*&lt;Colors&gt;([^&lt;]*)&lt;/Colors&gt;[^&lt;]*&lt;Language&gt;((?!$INFO[language])[a-z])*&lt;/Language&gt;</expression>
191				</RegExp>
192				<expression noclean="1"/>
193			</RegExp>
194			<expression noclean="1"/>
195		</RegExp>
196	</ParseArt>
197
198	<!-- input:	$1=html !-->
199	<!-- input:	$2=series url !-->
200	<!-- returns:	results in xml format <episodeguide><episode><title>*</title><url>*</url><season>*</season><epnum>*</epnum><thumb>*</thumb><id>*</id><aired>*</aired></episode>*</episodeguide> !-->
201	<GetEpisodeList dest="3">
202		<RegExp input="$$4" output="&lt;episodeguide&gt;\1&lt;/episodeguide&gt;" dest="3">
203			<RegExp input="$$2" output="\2-\3" dest="10">
204				<expression>http://(?:www\.)?thetvdb.com/api/(.+)/series/([0-9]*)/all/(.+).zip</expression>
205			</RegExp>
206			<RegExp conditional="!dvdorder">
207				<!-- Regular episodes (Absolute order) -->
208				<RegExp conditional="absolutenumber" input="$$1" output="&lt;episode&gt;&lt;id&gt;\1&lt;/id&gt;&lt;title&gt;\2&lt;/title&gt;&lt;aired&gt;\3&lt;/aired&gt;&lt;epnum&gt;\4&lt;/epnum&gt;&lt;season&gt;1&lt;/season&gt;&lt;url cache=&quot;$$10.xml&quot;&gt;$$2&lt;/url&gt;&lt;/episode&gt;" dest="4+">
209					<expression repeat="yes">&lt;Episode&gt;.*?&lt;id&gt;([0-9]*).*?&lt;EpisodeName&gt;([^&lt;]*).*?&lt;FirstAired&gt;([^&lt;]*).*?&lt;absolute_number&gt;([0-9]*).*?&lt;/Episode&gt;</expression>
210				</RegExp> 
211				<!-- Specials (Absolute order) -->
212				<RegExp conditional="absolutenumber" input="$$1" output="&lt;episode&gt;&lt;id&gt;\1&lt;/id&gt;&lt;title&gt;\2&lt;/title&gt;&lt;aired&gt;\4&lt;/aired&gt;&lt;epnum&gt;\3&lt;/epnum&gt;&lt;season&gt;0&lt;/season&gt;&lt;url cache=&quot;$$10.xml&quot;&gt;$$2&lt;/url&gt;&lt;/episode&gt;" dest="4+">
213					<expression repeat="yes">&lt;Episode&gt;.*?&lt;id&gt;([0-9]*).*?&lt;EpisodeName&gt;([^&lt;]*).*?&lt;EpisodeNumber&gt;([0-9]*).*?&lt;FirstAired&gt;([^&lt;]*).*?&lt;SeasonNumber&gt;0&lt;/SeasonNumber&gt;.*?&lt;/Episode&gt;</expression>
214				</RegExp>
215				<!-- Normal episodes -->
216				<RegExp conditional="!absolutenumber" input="$$1" output="&lt;episode&gt;&lt;title&gt;\2&lt;/title&gt;&lt;url cache=&quot;$$10.xml&quot;&gt;$$2&lt;/url&gt;&lt;epnum&gt;\3&lt;/epnum&gt;&lt;season&gt;\5&lt;/season&gt;&lt;id&gt;\1&lt;/id&gt;&lt;aired&gt;\4&lt;/aired&gt;&lt;/episode&gt;" dest="4">
217					<expression repeat="yes">&lt;Episode&gt;.*?&lt;id&gt;([0-9]+).*?&lt;EpisodeName&gt;([^&lt;]*).*?&lt;EpisodeNumber&gt;([0-9]+)[^&lt;]*.*?&lt;FirstAired&gt;([^&lt;]*)&lt;/FirstAired&gt;.*?&lt;SeasonNumber&gt;([0-9]+)[^&lt;]*.*?&lt;/Episode&gt;</expression>
218				</RegExp>
219			</RegExp>
220			<!-- DVD order -->
221			<RegExp conditional="dvdorder" input="$$1" output="&lt;episode&gt;&lt;title&gt;\4&lt;/title&gt;&lt;url cache=&quot;$$10.xml&quot;&gt;$$2&lt;/url&gt;&lt;epnum&gt;\2&lt;/epnum&gt;&lt;season&gt;\3&lt;/season&gt;&lt;id&gt;\1&lt;/id&gt;&lt;aired&gt;\5&lt;/aired&gt;&lt;/episode&gt;" dest="4">
222				<expression repeat="yes">&lt;Episode&gt;.*?&lt;id&gt;([0-9]+).*?&lt;Combined_episodenumber&gt;([^&lt;]*).*?&lt;Combined_season&gt;([^&lt;]*).*?&lt;EpisodeName&gt;([^&lt;]*).*?&lt;FirstAired&gt;([^&lt;]*)&lt;/FirstAired&gt;.*?&lt;/Episode&gt;</expression>
223			</RegExp>
224			<expression noclean="1"/>
225		</RegExp>
226	</GetEpisodeList>
227
228	<!-- input:	$1=html -->
229	<!-- returns:	results in xml format <details><writer>*</writer><director>*</director><cast>*</cast><rating>*</rating><rank>*</rank><plot>*</plot> -->
230	<GetEpisodeDetails dest="3">
231		<RegExp input="$$4" 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">
232			<RegExp input="$$1" output="\1" dest="8">
233				<expression noclean="1">&lt;Episode&gt;(.*?)&lt;/Episode&gt;</expression>
234			</RegExp>
235			<RegExp input="$$1" output="&lt;uniqueid&gt;$$2&lt;/uniqueid&gt;" dest="4">
236				<expression>&lt;id&gt;([0-9]*)&lt;/id&gt;</expression>
237			</RegExp>
238			<RegExp input="$$8" output="&lt;seriesid&gt;\1&lt;/seriesid&gt;" dest="4+">
239				<expression>&lt;seriesid&gt;([0-9]*)&lt;/seriesid&gt;</expression>
240			</RegExp>
241			<RegExp input="$$8" output="&lt;plot&gt;\1&lt;/plot&gt;" dest="4+">
242				<expression>&lt;Overview&gt;([^&lt;]*)&lt;/Overview&gt;</expression>
243			</RegExp>
244			<RegExp input="$$8" output="\1" dest="6">
245				<expression noclean="1">&lt;Writer&gt;([^&lt;]*)&lt;/Writer&gt;</expression>
246			</RegExp>
247			<RegExp input="$$6" output="&lt;credits&gt;\1&lt;/credits&gt;" dest="4+">
248				<expression repeat="yes">([^\|]*)\|</expression>
249			</RegExp>
250			<RegExp input="$$6" output="&lt;credits&gt;\1&lt;/credits&gt;" dest="4+">
251				<expression repeat="yes">([^,]*),</expression>
252			</RegExp>
253			<RegExp input="$$6" output="&lt;credits&gt;\1&lt;/credits&gt;" dest="4+">
254				<expression>([^\|,]+)$</expression>
255			</RegExp>
256			<RegExp input="$$8" output="\1" dest="6">
257				<expression noclean="1">&lt;Director&gt;([^&lt;]*)&lt;/Director&gt;</expression>
258			</RegExp>
259			<RegExp input="$$6" output="&lt;director&gt;\1&lt;/director&gt;" dest="4+">
260				<expression repeat="yes">([^\|]*)\|</expression>
261			</RegExp>
262			<RegExp input="$$6" output="&lt;director&gt;\1&lt;/director&gt;" dest="4+">
263				<expression repeat="yes">([^,]*),</expression>
264			</RegExp>
265			<RegExp input="$$6" output="&lt;director&gt;\1&lt;/director&gt;" dest="4+">
266				<expression>([^\|,]+)$</expression>
267			</RegExp>
268			<RegExp input="$$8" output="\1" dest="6">
269				<expression noclean="1">&lt;GuestStars&gt;([^&lt;]*)&lt;/GuestStars&gt;</expression>
270			</RegExp>
271			<RegExp input="$$6" output="&lt;actor&gt;&lt;name&gt;\1&lt;/name&gt;&lt;/actor&gt;" dest="4+">
272				<expression repeat="yes">([^\|]*)\|</expression>
273			</RegExp>
274			<RegExp input="$$6" output="&lt;actor&gt;&lt;name&gt;\1&lt;/name&gt;&lt;/actor&gt;" dest="4+">
275				<expression repeat="yes">([^,]*),</expression>
276			</RegExp>
277			<RegExp input="$$6" output="&lt;actor&gt;&lt;name&gt;\1&lt;/name&gt;&lt;/actor&gt;" dest="4+">
278				<expression>([^\|,]+)$</expression>
279			</RegExp>
280			<RegExp input="$$8" output="&lt;title&gt;\1&lt;/title&gt;" dest="4+">
281				<expression>&lt;EpisodeName&gt;([^&lt;]*)&lt;/EpisodeName&gt;</expression>
282			</RegExp>
283			<!-- Regular Episodes - Absolute Order -->
284			<RegExp conditional="absolutenumber" input="$$8" output="&lt;season&gt;1&lt;/season&gt;&lt;episode&gt;\2&lt;/episode&gt;" dest="4+">
285				<expression>&lt;SeasonNumber&gt;([1-9]*)&lt;/SeasonNumber&gt;.*?&lt;absolute_number&gt;([0-9]*)&lt;/absolute_number&gt;</expression>
286			</RegExp>
287			<!-- Specials - Absolute Order -->
288			<RegExp conditional="absolutenumber" input="$$8" output="&lt;season&gt;0&lt;/season&gt;&lt;episode&gt;\1&lt;/episode&gt;" dest="4+">
289				<expression>&lt;EpisodeNumber&gt;([0-9]*)&lt;/EpisodeNumber&gt;.*?&lt;SeasonNumber&gt;0&lt;/SeasonNumber&gt;</expression>
290			</RegExp>
291			<!-- Normal Season/Episodes -->
292			<RegExp conditional="!absolutenumber" input="$$9" output="&lt;season&gt;\1&lt;/season&gt;" dest="4+">
293				<RegExp conditional="!dvdorder" input="$$8" output="\1" dest="9">
294					<expression clear="yes">&lt;SeasonNumber&gt;([^&lt;]*)&lt;/SeasonNumber&gt;</expression>
295				</RegExp>
296				<RegExp conditional="dvdorder" input="$$8" output="\1" dest="9">
297					<expression>&lt;Combined_season&gt;([^&lt;]*)&lt;/Combined_season&gt;</expression>
298				</RegExp>
299				<expression/>
300			</RegExp>
301			<RegExp conditional="!absolutenumber" input="$$9" output="&lt;episode&gt;\1&lt;/episode&gt;" dest="4+">
302				<RegExp conditional="!dvdorder" input="$$8" output="\1" dest="9">
303					<expression clear="yes">&lt;EpisodeNumber&gt;([^&lt;]*)&lt;/EpisodeNumber&gt;</expression>
304				</RegExp>
305				<RegExp conditional="dvdorder" input="$$8" output="\1" dest="9">
306					<expression>&lt;Combined_episodenumber&gt;([^&lt;]*)&lt;/Combined_episodenumber&gt;</expression>
307				</RegExp>
308				<expression/>
309			</RegExp>
310			<RegExp input="$$8" output="&lt;thumb&gt;http://thetvdb.com/banners/\1&lt;/thumb&gt;" dest="4+">
311				<expression>&lt;filename&gt;([^&lt;]+)&lt;/filename&gt;</expression>
312			</RegExp>
313			<RegExp input="$$8" output="&lt;aired&gt;\1&lt;/aired&gt;" dest="4+">
314				<expression>&lt;FirstAired&gt;([^&lt;]+)&lt;/FirstAired&gt;</expression>
315			</RegExp>
316			<RegExp input="$$8" output="&lt;displayseason&gt;\1&lt;/displayseason&gt;" dest="4+">
317				<expression>&lt;airsbefore_season&gt;([^&lt;]+)&lt;/airsbefore_season&gt;</expression>
318			</RegExp>
319			<RegExp input="$$8" output="&lt;displayepisode&gt;\1&lt;/displayepisode&gt;" dest="4+">
320				<expression>&lt;airsbefore_episode&gt;([^&lt;]+)&lt;/airsbefore_episode&gt;</expression>
321			</RegExp>
322			<RegExp input="$$8" output="&lt;displayafterseason&gt;\1&lt;/displayafterseason&gt;" dest="4+">
323				<expression>&lt;airsafter_season&gt;([^&lt;]+)&lt;/airsafter_season&gt;</expression>
324			</RegExp>
325			<RegExp input="$INFO[RatingS]" output="$$12" dest="4+">
326				<RegExp input="$$8" output="&lt;rating&gt;\1&lt;/rating&gt;" dest="12+">
327					<expression>&lt;Rating&gt;([^&lt;]+)&lt;/Rating&gt;</expression>
328				</RegExp>
329				<RegExp input="$$8" output="&lt;votes&gt;\1&lt;/votes&gt;" dest="12+">
330					<expression>&lt;RatingCount&gt;([^&lt;]+)&lt;/RatingCount&gt;</expression>
331				</RegExp>
332				<expression>TheTVDB</expression>
333			</RegExp>
334			<RegExp input="$INFO[RatingS]" output="$$13" dest="4+">
335				<RegExp input="$$8" output="\1" dest="11">
336					<expression clear="yes">&lt;IMDB_ID&gt;([^&lt;]+)&lt;/IMDB_ID&gt;</expression>
337				</RegExp>
338				<RegExp input="$$11" output="\1" dest="13">
339					<RegExp conditional="fallback" input="$$8" output="&lt;rating&gt;\1&lt;/rating&gt;" dest="13+">
340						<expression>&lt;Rating&gt;([^&lt;]+)&lt;/Rating&gt;</expression>
341					</RegExp>
342					<RegExp conditional="fallback" input="$$8" output="&lt;votes&gt;\1&lt;/votes&gt;" dest="13+">
343						<expression>&lt;RatingCount&gt;([^&lt;]+)&lt;/RatingCount&gt;</expression>
344					</RegExp>
345					<expression>^$</expression>
346				</RegExp>
347				<RegExp input="$$11" output="&lt;chain function=&quot;GetIMDBRatingById&quot;&gt;$$11&lt;/chain&gt;" dest="13">
348					<expression>(.+)</expression>
349				</RegExp>
350				<expression>IMDb</expression>
351			</RegExp>
352			<RegExp input="$$1" output="&lt;runtime&gt;\1&lt;/runtime&gt;" dest="4+">
353				<expression>&lt;Runtime&gt;([^&lt;]+)&lt;/Runtime&gt;</expression>
354			</RegExp>
355			<expression noclean="1"/>
356		</RegExp>
357	</GetEpisodeDetails>
358</scraper>