cineworld_uk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +17 -0
  3. data/.travis.yml +4 -0
  4. data/CHANGELOG.md +9 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +59 -0
  8. data/Rakefile +15 -0
  9. data/cineworld_uk.gemspec +29 -0
  10. data/lib/cineworld_uk.rb +15 -0
  11. data/lib/cineworld_uk/cinema.rb +218 -0
  12. data/lib/cineworld_uk/film.rb +47 -0
  13. data/lib/cineworld_uk/internal/film_with_screenings_parser.rb +128 -0
  14. data/lib/cineworld_uk/screening.rb +33 -0
  15. data/lib/cineworld_uk/version.rb +6 -0
  16. data/test/fixtures/cinemas.html +420 -0
  17. data/test/fixtures/cinemas/brighton.html +8 -0
  18. data/test/fixtures/cinemas/bristol.html +1206 -0
  19. data/test/fixtures/cinemas/bury-st-edmunds.html +1211 -0
  20. data/test/fixtures/cinemas/chelsea.html +1030 -0
  21. data/test/fixtures/cinemas/the-o2-grenwich.html +1191 -0
  22. data/test/fixtures/whatson/brighton.html +7906 -0
  23. data/test/fixtures/whatson/brighton/autism-friendly-cloudy-2.html +79 -0
  24. data/test/fixtures/whatson/brighton/geethanjali-malayalam.html +71 -0
  25. data/test/fixtures/whatson/brighton/gravity.html +2129 -0
  26. data/test/fixtures/whatson/brighton/take-2-thursday-about-time.html +89 -0
  27. data/test/fixtures/whatson/glasgow-imax-at-gsc-cinema.html +3160 -0
  28. data/test/fixtures/whatson/glasgow-imax-at-gsc/the-hunger-games-catching-fire.html +498 -0
  29. data/test/fixtures/whatson/the-o2-greenwich.html +6854 -0
  30. data/test/fixtures/whatson/the-o2-greenwich/gravity.html +784 -0
  31. data/test/fixtures/whatson/wandsworth.html +13729 -0
  32. data/test/fixtures/whatson/wandsworth/arrambam-tamil.html +126 -0
  33. data/test/fixtures/whatson/wandsworth/bolshoi-ballet-live-lost-illusions.html +80 -0
  34. data/test/fixtures/whatson/wandsworth/frankenstein-nt-50th.html +82 -0
  35. data/test/fixtures/whatson/wandsworth/met-opera-falstaff.html +74 -0
  36. data/test/fixtures/whatson/wandsworth/nt-live-war-horse.html +80 -0
  37. data/test/fixtures/whatson/wandsworth/royal-ballet-live-the-sleeping-beauty.html +79 -0
  38. data/test/fixtures/whatson/wandsworth/royal-opera-live-parsifal-weird-date.html +79 -0
  39. data/test/fixtures/whatson/wandsworth/rsc-live-richard-ii-encore.html +80 -0
  40. data/test/fixtures/whatson/wandsworth/west-end-theatre-series-private-lives.html +80 -0
  41. data/test/lib/cineworld_uk/cinema_test.rb +466 -0
  42. data/test/lib/cineworld_uk/film_test.rb +95 -0
  43. data/test/lib/cineworld_uk/internal/film_with_screenings_parser_test.rb +200 -0
  44. data/test/lib/cineworld_uk/screening_test.rb +31 -0
  45. data/test/lib/cineworld_uk/version_test.rb +9 -0
  46. data/test/test_helper.rb +6 -0
  47. metadata +219 -0
@@ -0,0 +1,498 @@
1
+ <div class="row">
2
+ <div class="span2">
3
+ <div class="poster">
4
+ <a href="/whatson/6543?cinema=88&amp;date=all">
5
+ <div class="overlay banner previews">Advance Screenings</div>
6
+ <div class="image">
7
+ <img src="/cw/assets/images/whatson/film.placeholder.poster.jpg" data-original="/assets/media/films/6543_poster_large.jpg" width="140" alt="Poster for Film The Hunger Games: Catching Fire" />
8
+ </div>
9
+ </a>
10
+ </div>
11
+ </div>
12
+
13
+ <div class="span7">
14
+ <h1>
15
+ <a href="/whatson/6543?cinema=88&amp;date=all">The Hunger Games: Catching Fire</a>
16
+ <a class="classification gb-12a tooltip" href="/classification" title="No-one younger than 12 may see a '12A' film in a cinema unless accompanied by an adult. Responsibility for allowing under-12s to view lies with the accompanying or supervising adult." data-classification="12A" data-territory="GB">(12A)</a>
17
+ </h1>
18
+
19
+ <div class="inline-children">
20
+ <h3>Release date:</h3>
21
+ <p>22nd November 2013</p>
22
+ </div>
23
+
24
+ <div class="inline-children">
25
+ <h3>Running time:</h3>
26
+ <p>146 mins</p>
27
+ </div>
28
+
29
+ <h3>Synopsis:</h3>
30
+ <p>
31
+ A change of rules leads to an even deadlier death match in this blazing sequel to the global blockbuster.
32
+ </p>
33
+
34
+ <h3>Available screening types</h3>
35
+
36
+ <ul class="unstyled">
37
+ <li class="icon-service-twod"></li>
38
+ <li class="icon-service-imax"></li>
39
+
40
+ </ul>
41
+
42
+ <a class="action primary" title="Find out more about The Hunger Games: Catching Fire" href="/whatson/6543?cinema=88&amp;date=all">Find out more</a>
43
+
44
+ </div>
45
+ </div>
46
+
47
+ <br />
48
+ <p> <strong>Select a showtime and book to save 10% on your tickets with
49
+ <span class="icon-logo-mycineworld ">mycineworld</span></strong>
50
+ </p>
51
+
52
+ <div class="schedule row">
53
+ <div class="span9">
54
+ <div class="date row">
55
+ <div class="span2">
56
+ <h3>Wednesday 20th Nov</h3>
57
+ </div>
58
+
59
+ <div class="span7">
60
+ <ol class="performances">
61
+ <li>
62
+ <a class="tooltip performance action" title="00:30" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131120&amp;time=00:30" rel="nofollow">00:30</a>
63
+ <div class="tooltip-box performance">
64
+ <h2>Available screening types:</h2>
65
+
66
+ <hr class="thin" />
67
+
68
+ <ul class="unstyled">
69
+ <li class="icon-service-twod">2D</li>
70
+ <li class="icon-service-imax">IMAX</li>
71
+ </ul>
72
+ </div>
73
+ </li>
74
+ </ol>
75
+ </div>
76
+ </div>
77
+ <div class="date row">
78
+ <div class="span2">
79
+ <h3>Thursday 21st Nov</h3>
80
+ </div>
81
+
82
+ <div class="span7">
83
+ <ol class="performances">
84
+ <li>
85
+ <a class="tooltip performance action" title="14:00" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131121&amp;time=14:00" rel="nofollow">14:00</a>
86
+ <div class="tooltip-box performance">
87
+ <h2>Available screening types:</h2>
88
+
89
+ <hr class="thin" />
90
+
91
+ <ul class="unstyled">
92
+ <li class="icon-service-twod">2D</li>
93
+ <li class="icon-service-imax">IMAX</li>
94
+ </ul>
95
+ </div>
96
+ </li>
97
+ <li>
98
+ <a class="tooltip performance action" title="17:15" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131121&amp;time=17:15" rel="nofollow">17:15</a>
99
+ <div class="tooltip-box performance">
100
+ <h2>Available screening types:</h2>
101
+
102
+ <hr class="thin" />
103
+
104
+ <ul class="unstyled">
105
+ <li class="icon-service-twod">2D</li>
106
+ <li class="icon-service-imax">IMAX</li>
107
+ </ul>
108
+ </div>
109
+ </li>
110
+ <li>
111
+ <a class="tooltip performance action" title="20:30" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131121&amp;time=20:30" rel="nofollow">20:30</a>
112
+ <div class="tooltip-box performance">
113
+ <h2>Available screening types:</h2>
114
+
115
+ <hr class="thin" />
116
+
117
+ <ul class="unstyled">
118
+ <li class="icon-service-twod">2D</li>
119
+ <li class="icon-service-imax">IMAX</li>
120
+ </ul>
121
+ </div>
122
+ </li>
123
+ </ol>
124
+ </div>
125
+ </div>
126
+ <div class="date row">
127
+ <div class="span2">
128
+ <h3>Friday 22nd Nov</h3>
129
+ </div>
130
+
131
+ <div class="span7">
132
+ <ol class="performances">
133
+ <li>
134
+ <a class="tooltip performance action" title="20:40" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131122&amp;time=20:40" rel="nofollow">20:40</a>
135
+ <div class="tooltip-box performance">
136
+ <h2>Available screening types:</h2>
137
+
138
+ <hr class="thin" />
139
+
140
+ <ul class="unstyled">
141
+ <li class="icon-service-twod">2D</li>
142
+ <li class="icon-service-imax">IMAX</li>
143
+ </ul>
144
+ </div>
145
+ </li>
146
+ <li>
147
+ <a class="tooltip performance action" title="23:50" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131122&amp;time=23:50" rel="nofollow">23:50</a>
148
+ <div class="tooltip-box performance">
149
+ <h2>Available screening types:</h2>
150
+
151
+ <hr class="thin" />
152
+
153
+ <ul class="unstyled">
154
+ <li class="icon-service-twod">2D</li>
155
+ <li class="icon-service-imax">IMAX</li>
156
+ </ul>
157
+ </div>
158
+ </li>
159
+ </ol>
160
+ </div>
161
+ </div>
162
+ <div class="date row">
163
+ <div class="span2">
164
+ <h3>Saturday 23rd Nov</h3>
165
+ </div>
166
+
167
+ <div class="span7">
168
+ <ol class="performances">
169
+ <li>
170
+ <a class="tooltip performance action" title="14:00" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131123&amp;time=14:00" rel="nofollow">14:00</a>
171
+ <div class="tooltip-box performance">
172
+ <h2>Available screening types:</h2>
173
+
174
+ <hr class="thin" />
175
+
176
+ <ul class="unstyled">
177
+ <li class="icon-service-twod">2D</li>
178
+ <li class="icon-service-imax">IMAX</li>
179
+ </ul>
180
+ </div>
181
+ </li>
182
+ <li>
183
+ <a class="tooltip performance action" title="17:20" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131123&amp;time=17:20" rel="nofollow">17:20</a>
184
+ <div class="tooltip-box performance">
185
+ <h2>Available screening types:</h2>
186
+
187
+ <hr class="thin" />
188
+
189
+ <ul class="unstyled">
190
+ <li class="icon-service-twod">2D</li>
191
+ <li class="icon-service-imax">IMAX</li>
192
+ </ul>
193
+ </div>
194
+ </li>
195
+ <li>
196
+ <a class="tooltip performance action" title="20:40" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131123&amp;time=20:40" rel="nofollow">20:40</a>
197
+ <div class="tooltip-box performance">
198
+ <h2>Available screening types:</h2>
199
+
200
+ <hr class="thin" />
201
+
202
+ <ul class="unstyled">
203
+ <li class="icon-service-twod">2D</li>
204
+ <li class="icon-service-imax">IMAX</li>
205
+ </ul>
206
+ </div>
207
+ </li>
208
+ <li>
209
+ <a class="tooltip performance action" title="23:50" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131123&amp;time=23:50" rel="nofollow">23:50</a>
210
+ <div class="tooltip-box performance">
211
+ <h2>Available screening types:</h2>
212
+
213
+ <hr class="thin" />
214
+
215
+ <ul class="unstyled">
216
+ <li class="icon-service-twod">2D</li>
217
+ <li class="icon-service-imax">IMAX</li>
218
+ </ul>
219
+ </div>
220
+ </li>
221
+ </ol>
222
+ </div>
223
+ </div>
224
+ <div class="date row">
225
+ <div class="span2">
226
+ <h3>Sunday 24th Nov</h3>
227
+ </div>
228
+
229
+ <div class="span7">
230
+ <ol class="performances">
231
+ <li>
232
+ <a class="tooltip performance action" title="14:00" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131124&amp;time=14:00" rel="nofollow">14:00</a>
233
+ <div class="tooltip-box performance">
234
+ <h2>Available screening types:</h2>
235
+
236
+ <hr class="thin" />
237
+
238
+ <ul class="unstyled">
239
+ <li class="icon-service-twod">2D</li>
240
+ <li class="icon-service-imax">IMAX</li>
241
+ </ul>
242
+ </div>
243
+ </li>
244
+ <li>
245
+ <a class="tooltip performance action" title="17:20" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131124&amp;time=17:20" rel="nofollow">17:20</a>
246
+ <div class="tooltip-box performance">
247
+ <h2>Available screening types:</h2>
248
+
249
+ <hr class="thin" />
250
+
251
+ <ul class="unstyled">
252
+ <li class="icon-service-twod">2D</li>
253
+ <li class="icon-service-imax">IMAX</li>
254
+ </ul>
255
+ </div>
256
+ </li>
257
+ <li>
258
+ <a class="tooltip performance action" title="20:40" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131124&amp;time=20:40" rel="nofollow">20:40</a>
259
+ <div class="tooltip-box performance">
260
+ <h2>Available screening types:</h2>
261
+
262
+ <hr class="thin" />
263
+
264
+ <ul class="unstyled">
265
+ <li class="icon-service-twod">2D</li>
266
+ <li class="icon-service-imax">IMAX</li>
267
+ </ul>
268
+ </div>
269
+ </li>
270
+ </ol>
271
+ </div>
272
+ </div>
273
+ <div class="date row">
274
+ <div class="span2">
275
+ <h3>Monday 25th Nov</h3>
276
+ </div>
277
+
278
+ <div class="span7">
279
+ <ol class="performances">
280
+ <li>
281
+ <a class="tooltip performance action" title="11:00" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131125&amp;time=11:00" rel="nofollow">11:00</a>
282
+ <div class="tooltip-box performance">
283
+ <h2>Available screening types:</h2>
284
+
285
+ <hr class="thin" />
286
+
287
+ <ul class="unstyled">
288
+ <li class="icon-service-twod">2D</li>
289
+ <li class="icon-service-imax">IMAX</li>
290
+ </ul>
291
+ </div>
292
+ </li>
293
+ <li>
294
+ <a class="tooltip performance action" title="14:00" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131125&amp;time=14:00" rel="nofollow">14:00</a>
295
+ <div class="tooltip-box performance">
296
+ <h2>Available screening types:</h2>
297
+
298
+ <hr class="thin" />
299
+
300
+ <ul class="unstyled">
301
+ <li class="icon-service-twod">2D</li>
302
+ <li class="icon-service-imax">IMAX</li>
303
+ </ul>
304
+ </div>
305
+ </li>
306
+ <li>
307
+ <a class="tooltip performance action" title="17:20" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131125&amp;time=17:20" rel="nofollow">17:20</a>
308
+ <div class="tooltip-box performance">
309
+ <h2>Available screening types:</h2>
310
+
311
+ <hr class="thin" />
312
+
313
+ <ul class="unstyled">
314
+ <li class="icon-service-twod">2D</li>
315
+ <li class="icon-service-imax">IMAX</li>
316
+ </ul>
317
+ </div>
318
+ </li>
319
+ <li>
320
+ <a class="tooltip performance action" title="20:40" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131125&amp;time=20:40" rel="nofollow">20:40</a>
321
+ <div class="tooltip-box performance">
322
+ <h2>Available screening types:</h2>
323
+
324
+ <hr class="thin" />
325
+
326
+ <ul class="unstyled">
327
+ <li class="icon-service-twod">2D</li>
328
+ <li class="icon-service-imax">IMAX</li>
329
+ </ul>
330
+ </div>
331
+ </li>
332
+ </ol>
333
+ </div>
334
+ </div>
335
+ <div class="date row">
336
+ <div class="span2">
337
+ <h3>Tuesday 26th Nov</h3>
338
+ </div>
339
+
340
+ <div class="span7">
341
+ <ol class="performances">
342
+ <li>
343
+ <a class="tooltip performance action" title="11:00" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131126&amp;time=11:00" rel="nofollow">11:00</a>
344
+ <div class="tooltip-box performance">
345
+ <h2>Available screening types:</h2>
346
+
347
+ <hr class="thin" />
348
+
349
+ <ul class="unstyled">
350
+ <li class="icon-service-twod">2D</li>
351
+ <li class="icon-service-imax">IMAX</li>
352
+ </ul>
353
+ </div>
354
+ </li>
355
+ <li>
356
+ <a class="tooltip performance action" title="14:00" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131126&amp;time=14:00" rel="nofollow">14:00</a>
357
+ <div class="tooltip-box performance">
358
+ <h2>Available screening types:</h2>
359
+
360
+ <hr class="thin" />
361
+
362
+ <ul class="unstyled">
363
+ <li class="icon-service-twod">2D</li>
364
+ <li class="icon-service-imax">IMAX</li>
365
+ </ul>
366
+ </div>
367
+ </li>
368
+ <li>
369
+ <a class="tooltip performance action" title="17:20" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131126&amp;time=17:20" rel="nofollow">17:20</a>
370
+ <div class="tooltip-box performance">
371
+ <h2>Available screening types:</h2>
372
+
373
+ <hr class="thin" />
374
+
375
+ <ul class="unstyled">
376
+ <li class="icon-service-twod">2D</li>
377
+ <li class="icon-service-imax">IMAX</li>
378
+ </ul>
379
+ </div>
380
+ </li>
381
+ <li>
382
+ <a class="tooltip performance action" title="20:40" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131126&amp;time=20:40" rel="nofollow">20:40</a>
383
+ <div class="tooltip-box performance">
384
+ <h2>Available screening types:</h2>
385
+
386
+ <hr class="thin" />
387
+
388
+ <ul class="unstyled">
389
+ <li class="icon-service-twod">2D</li>
390
+ <li class="icon-service-imax">IMAX</li>
391
+ </ul>
392
+ </div>
393
+ </li>
394
+ </ol>
395
+ </div>
396
+ </div>
397
+ <div class="date row">
398
+ <div class="span2">
399
+ <h3>Wednesday 27th Nov</h3>
400
+ </div>
401
+
402
+ <div class="span7">
403
+ <ol class="performances">
404
+ <li>
405
+ <a class="tooltip performance action" title="14:00" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131127&amp;time=14:00" rel="nofollow">14:00</a>
406
+ <div class="tooltip-box performance">
407
+ <h2>Available screening types:</h2>
408
+
409
+ <hr class="thin" />
410
+
411
+ <ul class="unstyled">
412
+ <li class="icon-service-twod">2D</li>
413
+ <li class="icon-service-imax">IMAX</li>
414
+ </ul>
415
+ </div>
416
+ </li>
417
+ <li>
418
+ <a class="tooltip performance action" title="17:20" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131127&amp;time=17:20" rel="nofollow">17:20</a>
419
+ <div class="tooltip-box performance">
420
+ <h2>Available screening types:</h2>
421
+
422
+ <hr class="thin" />
423
+
424
+ <ul class="unstyled">
425
+ <li class="icon-service-twod">2D</li>
426
+ <li class="icon-service-imax">IMAX</li>
427
+ </ul>
428
+ </div>
429
+ </li>
430
+ <li>
431
+ <a class="tooltip performance action" title="20:40" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131127&amp;time=20:40" rel="nofollow">20:40</a>
432
+ <div class="tooltip-box performance">
433
+ <h2>Available screening types:</h2>
434
+
435
+ <hr class="thin" />
436
+
437
+ <ul class="unstyled">
438
+ <li class="icon-service-twod">2D</li>
439
+ <li class="icon-service-imax">IMAX</li>
440
+ </ul>
441
+ </div>
442
+ </li>
443
+ </ol>
444
+ </div>
445
+ </div>
446
+ <div class="date row">
447
+ <div class="span2">
448
+ <h3>Thursday 28th Nov</h3>
449
+ </div>
450
+
451
+ <div class="span7">
452
+ <ol class="performances">
453
+ <li>
454
+ <a class="tooltip performance action" title="14:00" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131128&amp;time=14:00" rel="nofollow">14:00</a>
455
+ <div class="tooltip-box performance">
456
+ <h2>Available screening types:</h2>
457
+
458
+ <hr class="thin" />
459
+
460
+ <ul class="unstyled">
461
+ <li class="icon-service-twod">2D</li>
462
+ <li class="icon-service-imax">IMAX</li>
463
+ </ul>
464
+ </div>
465
+ </li>
466
+ <li>
467
+ <a class="tooltip performance action" title="17:20" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131128&amp;time=17:20" rel="nofollow">17:20</a>
468
+ <div class="tooltip-box performance">
469
+ <h2>Available screening types:</h2>
470
+
471
+ <hr class="thin" />
472
+
473
+ <ul class="unstyled">
474
+ <li class="icon-service-twod">2D</li>
475
+ <li class="icon-service-imax">IMAX</li>
476
+ </ul>
477
+ </div>
478
+ </li>
479
+ <li>
480
+ <a class="tooltip performance action" title="20:40" href="/booking?cinema=88&amp;filmEdi=43600&amp;date=20131128&amp;time=20:40" rel="nofollow">20:40</a>
481
+ <div class="tooltip-box performance">
482
+ <h2>Available screening types:</h2>
483
+
484
+ <hr class="thin" />
485
+
486
+ <ul class="unstyled">
487
+ <li class="icon-service-twod">2D</li>
488
+ <li class="icon-service-imax">IMAX</li>
489
+ </ul>
490
+ </div>
491
+ </li>
492
+ </ol>
493
+ </div>
494
+ </div>
495
+
496
+ <a class="action secondary light" href="/whatson/6543?cinema=88&amp;date=all">View all dates</a>
497
+ </div>
498
+ </div>