forked from ekarorgit/metadata.csfd.cz
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcsfdcz.xml
364 lines (342 loc) · 20.3 KB
/
csfdcz.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<?xml version="1.0" encoding="UTF-8"?>
<scraper name="csfdcz" date="2017-11-03" framework="1.1">
<!-- input : $$1=nfo file -->
<!-- output: <url>*</url> -->
<!-- output: $$10=user-agent -->
<NfoUrl dest="3">
<RegExp input="" output="user-agent=Mozilla%2F5.0%20%28Windows%20NT%206.1%3B%20Win64%3B%20x64%29%20AppleWebKit%2F537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome%2F78.0.3904.97%20Safari%2F537.36" dest="10"><expression/></RegExp>
<RegExp input="$$1" output="<url gzip="yes" cache="CSFD.prehled-\1.html">https://www.csfd.cz/film/\1/prehled/|$$10</url><id>\1</id>" dest="3">
<expression>https?://(?:www\.)?csfd\.cz/film/(\d+-.*?)/</expression>
</RegExp>
</NfoUrl>
<!-- input : $$1=query string -->
<!-- output: <url>*</url> -->
<!-- output: $$10=user-agent -->
<CreateSearchUrl clearbuffers="no" dest="8">
<RegExp input="" output="user-agent=Mozilla%2F5.0%20%28Windows%20NT%206.1%3B%20Win64%3B%20x64%29%20AppleWebKit%2F537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome%2F78.0.3904.97%20Safari%2F537.36" dest="10"><expression/></RegExp>
<RegExp input="$$1" output="<url gzip="yes" cache="CSFD.hledat-\1.html">https://www.csfd.cz/hledat/?q=\1|$$10</url>" dest="8">
<RegExp conditional="titlepartsremove" input="$$1" output="\1" dest="1">
<expression noclean="1">(.*)%20part%20\d+$</expression>
</RegExp>
<RegExp conditional="yearsearchcsfd" input="$$2" output="+\1" dest="1+">
<expression>(\d+)</expression>
</RegExp>
<expression noclean="1"/>
</RegExp>
</CreateSearchUrl>
<!-- input : $$1=search html -->
<!-- input : $$2=search url -->
<!-- input : $$10=user-agent -->
<!-- output: <results><entity><title>*</title><url>*</url></entity>*</results> -->
<GetSearchResults clearbuffers="no" dest="8">
<RegExp input="$$7" output="<?xml version="1.0" encoding="UTF-8" standalone="yes"?><results sorted="yes">\1</results>" dest="8">
<RegExp input="$$6" output="<entity><title>\2\3\4</title><url gzip="yes" cache="CSFD.prehled-\1.html">https://www.csfd.cz/film/\1/prehled/|$$10</url></entity>" dest="7+">
<!-- primo nalezeny film -->
<RegExp input="$$1" output="<u>\3</u><t>\1</t><t1> \2</t1>" dest="6">
<expression repeat="no" noclean="1"><title>([^|]*?)( \(\d+\))? \| .*?csfd.cz/film/(\d+[^/]*)/(?:prehled|komentare|galerie)/"></expression>
</RegExp>
<!-- extract search-list -->
<RegExp input="$$1" output="\1" dest="1">
<expression repeat="no" noclean="1">id="search-films".*?>(.*?)<div class="footer"</expression>
</RegExp>
<!-- hlavni nabidka -->
<RegExp input="$$1" output="<u>\1</u><t>\2</t><t1> \3</t1><t2> (\4)</t2>" dest="6+">
<expression repeat="yes" noclean="1,2,3">subject"><a href="/film/([^/]+)/" class="film c.">([^<]*)</a>.*?(?:<span class="search-name">([^<]*)</span>\s*)?<p>([^<]*)<</expression>
</RegExp>
<!-- vedlejsi nabidka -->
<RegExp input="$$1" output="<u>\1</u><t>\2</t><t1> \5</t1><t2> \3 \4</t2>" dest="6+">
<expression repeat="yes" noclean="1,2,3,4,5"><li>\s*<a href="/film/([^/]*)/" class="film c.">([^<]*)</a>\s*(?:<span class="film-type">(\(.*?\))</span>)?\s*<span class="film-year"[^>]*>(\(\d+\))</span>\s*(?:<span class="search-name">([^<]*)</span>\s*)?</expression>
</RegExp>
<expression repeat="yes" noclean="1,2,3,4"><u>(.*?)</u><t>(.*?)</t>(?:<t1>(.*?)</t1>)?(?:<t2>(.*?)</t2>)?</expression>
</RegExp>
<expression noclean="1"/>
</RegExp>
</GetSearchResults>
<!-- input : $$1=detail html -->
<!-- input : $$10=user-agent -->
<!-- output: <details><entity><title>*</title><url>*</url></entity>*</details> -->
<GetDetails clearbuffers="no" dest="8">
<RegExp input="$$7" output="<details><id>$$2</id>\1</details>" dest="8">
<!-- IMDB ID -->
<RegExp input="$$1" output="tt\1" dest="2">
<expression noclean="1" trim="1"><a href="https?://[^"]*imdb\.com/title/tt(\d+)/</expression>
</RegExp>
<!-- CSFD URL -->
<RegExp input="$$1" output="\1" dest="3">
<expression noclean="1">https?://(?:www\.)?csfd\.cz/film/(\d+-.*?)/(?:prehled|komentare|galerie)/</expression>
</RegExp>
<!-- fallback - handle empty IMDB id -->
<RegExp input="$$2" output="<url function="GetFallbackDetails" cache="$$2-main.html">http://akas.imdb.com/title/$$2/</url>" dest="7+">
<expression>(.+)</expression>
</RegExp>
<!-- CSFD info -->
<RegExp output="<url function="GetCSFDDetails" cache="CSFD.prehled-$$3.html">https://www.csfd.cz/filmy/$$3/prehled/|$$10</url>" dest="7+">
<expression />
</RegExp>
<!-- Rest info -->
<expression noclean="1"/>
</RegExp>
<!-- clean $$7 to prevent infinite recursion -->
<RegExp output="" dest="7">
<expression />
</RegExp>
</GetDetails>
<!-- input : $$1=imdb title html -->
<!-- input : $$10=user-agent -->
<GetFallbackDetails clearbuffers="no" dest="8">
<!-- fix for redirect IMDB id -->
<RegExp input="$$1" output="\1" dest="2">
<expression>href="https://www.imdb.com/title/(tt[0-9]+)/"</expression>
</RegExp>
<RegExp input="$$7" output="<details>\1</details>" dest="8">
<RegExp input="$$2" output="<id>\1</id>" dest="7">
<expression noclean="1" />
</RegExp>
<RegExp conditional="tmdbcast" output="<chain function="GetTMDBCastByIdChain">$$2</chain>" dest="7+">
<expression />
</RegExp>
<RegExp conditional="!tmdbcast" output="<chain function="GetIMDBCastById">$$2</chain>" dest="7+">
<expression />
</RegExp>
<RegExp output="<chain function="GetIMDBDirectorsById">$$2</chain>" dest="7+">
<expression />
</RegExp>
<RegExp output="<chain function="GetIMDBWritersById">$$2</chain>" dest="7+">
<expression />
</RegExp>
<RegExp conditional="tmdbset" output="<chain function="GetTMDBSetByIdChain">$$2::$INFO[tmdbsetlanguage]</chain>" dest="7+">
<expression />
</RegExp>
<RegExp conditional="imdbposter" output="<url function="GetIMDBThumb" cache="IMDB.media-$$2.html">https://www.imdb.com/title/$$2/mediaindex</url>" dest="7+">
<expression />
</RegExp>
<RegExp conditional="tmdbposter" output="<chain function="GetTMDBThumbsByIdChain">$$2::$INFO[tmdbthumblanguage]</chain>" dest="7+">
<expression />
</RegExp>
<RegExp conditional="tmdbfanart" output="<chain function="GetTMDBFanartByIdChain">$$2::$INFO[tmdbfanartlanguage]</chain>" dest="7+">
<expression />
</RegExp>
<RegExp conditional="tmdbtrailer" output="<chain function="GetTMDBTrailerByIdChain">$$2::$INFO[tmdbtrailerlanguage]</chain>" dest="7+">
<expression />
</RegExp>
<RegExp output="<chain function="GetTMDBPlotByIdChain">$$2::$INFO[tmdbplotlanguage]</chain>" dest="7+">
<expression />
</RegExp>
<RegExp output="<url function="GetRestIMDBInfo" cache="IMDB.combined-$$2.html">http://akas.imdb.com/title/$$2/combined</url>" dest="7+">
<expression />
</RegExp>
<expression noclean="1" />
</RegExp>
</GetFallbackDetails>
<!-- input : $$1=csfd prehled html -->
<!-- input : $$10=user-agent -->
<GetCSFDDetails clearbuffers="no" dest="8">
<RegExp input="$$7" output="<details>\1</details>" dest="8">
<!-- Titles -->
<!-- local title $$11 -->
<RegExp input="$$1" output="\1" dest="11">
<expression noclean="1" trim="1"><h1[^>]*>([^<]*)<</expression>
</RegExp>
<!-- original title $$12 -->
<RegExp input="$$1" output="\1" dest="12">
<expression noclean="1" trim="1">images/flags/[^<]*<h3[^>]*>([^<]*)<</expression>
</RegExp>
<!-- EN title $$13 without fallback (can be empty)-->
<!-- New Zealand -->
<RegExp input="$$1" output="\1" dest="13">
<expression noclean="1" trim="1">images/flags/159/571/159571944_5bb9fe.gif[^<]*<h3[^>]*>([^<]*)<</expression>
</RegExp>
<!-- Ireland -->
<RegExp input="$$1" output="\1" dest="13">
<expression noclean="1" trim="1">images/flags/159/571/159571886_c8fb93.gif[^<]*<h3[^>]*>([^<]*)<</expression>
</RegExp>
<!-- Australia -->
<RegExp input="$$1" output="\1" dest="13">
<expression noclean="1" trim="1">images/flags/159/571/159571895_278ffd.gif[^<]*<h3[^>]*>([^<]*)<</expression>
</RegExp>
<!-- Canada -->
<RegExp input="$$1" output="\1" dest="13">
<expression noclean="1" trim="1">images/flags/159/571/159571943_a94257.gif[^<]*<h3[^>]*>([^<]*)<</expression>
</RegExp>
<!-- GB -->
<RegExp input="$$1" output="\1" dest="13">
<expression noclean="1" trim="1">images/flags/159/572/159572086_463ca5.gif[^<]*<h3[^>]*>([^<]*)<</expression>
</RegExp>
<!-- USA -->
<RegExp input="$$1" output="\1" dest="13">
<expression noclean="1" trim="1">images/flags/159/572/159572019_fcfacc.gif[^<]*<h3[^>]*>([^<]*)<</expression>
</RegExp>
<!-- CZ title $$14 with local fallback -->
<RegExp output="$$11" dest="14">
<expression />
</RegExp>
<RegExp input="$$1" output="\1" dest="14">
<expression trim="1">images/flags/159/571/159571898_ce0ce5.gif[^<]*<h3[^>]*>([^<]*)<</expression>
</RegExp>
<!-- SK title $$15 with local fallback -->
<RegExp output="$$11" dest="15">
<expression />
</RegExp>
<RegExp input="$$1" output="\1" dest="15">
<expression trim="1">images/flags/159/571/159571967_be0783.gif[^<]*<h3[^>]*>([^<]*)<</expression>
</RegExp>
<!-- construct title -->
<!-- primary selection -->
<RegExp output="$$11" dest="16">
<expression />
</RegExp>
<RegExp input="$INFO[titleprimaryl]" output="$$12" dest="16">
<expression noclean="1" >^original$</expression>
</RegExp>
<RegExp input="$INFO[titleprimaryl]" output="$$6" dest="16">
<!-- local fallback for EN -->
<RegExp output="$$11" dest="6">
<expression />
</RegExp>
<RegExp input="$$13" output="$$13" dest="6">
<expression noclean="1">(.+)</expression>
</RegExp>
<expression noclean="1" >^en$</expression>
</RegExp>
<RegExp input="$INFO[titleprimaryl]" output="$$14" dest="16">
<expression noclean="1" >^cs$</expression>
</RegExp>
<RegExp input="$INFO[titleprimaryl]" output="$$15" dest="16">
<expression noclean="1" >^sk$</expression>
</RegExp>
<!-- secondary selection -->
<RegExp output="$$12" dest="17">
<expression />
</RegExp>
<RegExp input="$INFO[titlesecondaryl]" output="$$6" dest="17">
<!-- original fallback for EN -->
<RegExp output="$$12" dest="6">
<expression />
</RegExp>
<RegExp input="$$13" output="$$13" dest="6">
<expression noclean="1">(.+)</expression>
</RegExp>
<expression noclean="1" >^en$</expression>
</RegExp>
<!-- title combination selection -->
<!-- fallback for missing secondary -->
<RegExp output="$$16" dest="20">
<expression />
</RegExp>
<!-- primary with secondary -->
<RegExp input="$$17" output="$$16 ($$17)" dest="20">
<expression>(.+)</expression>
</RegExp>
<!-- swapped primary with secondary override -->
<RegExp conditional="titleswap" input="$$17" output="$$17 ($$16)" dest="20">
<expression>(.+)</expression>
</RegExp>
<!-- remove secondary if same as primary override -->
<RegExp conditional="titlesame" input="$$16" output="$$16" dest="20">
<expression noclean="1">^$$17$</expression>
</RegExp>
<!-- primary only override -->
<RegExp conditional="!titlesecondary" output="$$16" dest="20">
<expression />
</RegExp>
<!-- output title -->
<RegExp output="<title>$$20</title><originaltitle>$$12</originaltitle>" dest="7+">
<expression/>
</RegExp>
<!-- plot -->
<RegExp condition="!tmdbplot" input="$$6" output="<plot>\1</plot>" dest="7+">
<RegExp input="$$1" output="\1<br> " dest="4">
<expression clear="yes" noclean="1"><h3>Obsah.*?</h3>(.*?)<span class="source</expression>
</RegExp>
<RegExp output="" dest="5"><expression/></RegExp>
<RegExp input="$$4" output="\1 " dest="5+">
<expression repeat="yes" noclean="1">(.*?)\s\s+</expression>
</RegExp>
<RegExp output="" dest="6"><expression/></RegExp>
<RegExp input="$$5" output="\1\n" dest="6+">
<expression repeat="yes" trim="yes">(.*?)<br\s*/?>\s*</expression>
</RegExp>
<expression trim="yes">(.+)</expression>
</RegExp>
<!-- runtime -->
<RegExp input="$$1" output="<runtime>\1</runtime>" dest="7+">
<expression repeat="no" trim="1" noclean="0">([0-9]+) min\s*(?:\([^)]+\)\s*)?</p></expression>
</RegExp>
<!-- rating -->
<RegExp input="$$1" output="<rating max="100">\1</rating>" dest="7+">
<expression repeat="no" trim="1" noclean="0"><h2 class="average">[^0-9]*([0-9]+)%</expression>
</RegExp>
<!-- votes -->
<RegExp input="$$1" output="<votes>\1\2</votes>" dest="7+">
<expression repeat="no" trim="1" noclean="0">"rating-count-link"[^(]*\((\d+)(?:[^0-9)]*(\d+))?\)\s*</div></expression>
</RegExp>s
<!-- year -->
<RegExp input="$$1" output="<year>\1</year>" dest="7+">
<expression repeat="no" trim="1" noclean="0"><span itemprop="dateCreated">([0-9]+)</span></expression>
</RegExp>
<!-- genre -->
<RegExp input="$$1" output="<genre>\1</genre>" dest="7+">
<expression repeat="yes" trim="1" noclean="0"><p class="genre">([^<]*)</expression>
</RegExp>
<!-- country -->
<RegExp input="$$1" output="<country>\1</country>" dest="7+">
<expression repeat="yes"><p class="origin">([^,]*),</expression>
</RegExp>
<!-- csfd thumb-->
<RegExp conditional="csfdposter" input="$$1" output="<thumb>https://\1|$$10</thumb>" dest="7+">
<expression repeat="yes" noclean="1">(img.csfd.cz/files/images/film/posters[^"]*)(?:[?][hw][0-9]+)"</expression>
</RegExp>
<expression noclean="1" />
</RegExp>
</GetCSFDDetails>
<!-- input : $$1=imdb combined html -->
<GetRestIMDBInfo dest="8">
<RegExp input="$$7" output="<details>\1</details>" dest="8">
<RegExp input="$$1" output="<year>\1</year>" dest="7+">
<expression>a href="/year/([0-9]*)</expression>
</RegExp>
<RegExp input="$$1" output="<top250>\1</top250>" dest="7+">
<expression>Top 250: #([0-9]*)</a></expression>
</RegExp>
<RegExp input="$$1" output="<mpaa>\1</mpaa>" dest="7+">
<expression>MPAA</a>:</h5>\n?<div class="info-content">\n?(.[^<]*)</expression>
</RegExp>
<RegExp input="$$1" output="<certification>\1 \3</certification>" dest="7+">
<expression repeat="yes"><a href="/search/title\?certificates=[^"]*">([^<]*)</a>[^<]*(<i>([^<]*)</i>)?</expression>
</RegExp>
<RegExp input="$$1" output="<tagline>\1</tagline>" dest="7+">
<expression><h5>Tagline:</h5>\n<div class="info-content">([^<]*)</expression>
</RegExp>
<RegExp input="$$1" output="<runtime>\1</runtime>" dest="7+">
<expression trim="1"><h5>Runtime:</h5>\n?<div class="info-content">\n?([0-9]*)</expression>
</RegExp>
<RegExp input="$$1" output="<country>\1</country>" dest="7+">
<expression repeat="yes">"/Sections/Countries/[^/]*/">([^<]*)</a></expression>
</RegExp>
<RegExp input="$$1" output="<studio>\1</studio>" dest="7+">
<expression repeat="yes">"/company/[^/]*/">([^<]*)</a></expression>
</RegExp>
<expression noclean="1"/>
</RegExp>
</GetRestIMDBInfo>
<!-- input : $$1=imdb thumb part html -->
<GetIMDBThumb dest="8">
<RegExp input="$$7" output="<details>\1</details>" dest="8">
<RegExp input="$$1" output="<thumb>\1.jpg</thumb>" dest="7">
<expression noclean="1">class="poster"[^>]*src="(https?://[^/]+/images/[^/]+/[^\.]+)\.</expression>
</RegExp>
<expression noclean="1"/>
</RegExp>
</GetIMDBThumb>
<GetIMDBThumbs dest="8">
<RegExp input="$$7" output="<details>\1</details>" dest="8">
<RegExp input="$$1" output="<thumb>\1.jpg</thumb>" dest="7">
<expression noclean="1">class="poster"[^>]*src="(https?://[^/]+/images/[^/]+/[^\.]+)\.</expression>
</RegExp>
<RegExp input="$$1" output="<thumb>\1.jpg</thumb>" dest="7+">
<expression repeat="yes" noclean="1">itemprop="thumbnailUrl"><img[^>]+src="(https?://[^/]+/images/[^/]+/[^\.]+)\.</expression>
</RegExp>
<expression />
</RegExp>
</GetIMDBThumbs>
</scraper>