subscene 0.0.1 → 0.0.2
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.
- data/.gitignore +1 -0
- data/.rspec +2 -0
- data/.travis.yml +6 -0
- data/Gemfile +4 -0
- data/README.md +52 -3
- data/Rakefile +7 -0
- data/lib/subscene.rb +103 -1
- data/lib/subscene/error.rb +3 -0
- data/lib/subscene/response.rb +22 -0
- data/lib/subscene/response/html.rb +20 -0
- data/lib/subscene/response/raise_error.rb +20 -0
- data/lib/subscene/subtitle.rb +56 -0
- data/lib/subscene/subtitle_result.rb +35 -0
- data/lib/subscene/subtitle_result_set.rb +19 -0
- data/lib/subscene/version.rb +1 -1
- data/spec/fixtures/result_sample.html +31 -0
- data/spec/fixtures/result_set_sample.html +96 -0
- data/spec/fixtures/search_with_results.html +966 -0
- data/spec/fixtures/subtitle.zip +0 -0
- data/spec/fixtures/subtitle_sample.html +485 -0
- data/spec/spec_helper.rb +21 -0
- data/spec/subscene/response/raise_error_spec.rb +12 -0
- data/spec/subscene/subtitle_result_set_spec.rb +20 -0
- data/spec/subscene/subtitle_result_spec.rb +20 -0
- data/spec/subscene/subtitle_spec.rb +35 -0
- data/spec/subscene_spec.rb +43 -0
- data/subscene.gemspec +5 -1
- metadata +100 -5
Binary file
|
@@ -0,0 +1,485 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE html>
|
3
|
+
<html lang="en">
|
4
|
+
|
5
|
+
<head>
|
6
|
+
<meta charset="utf-8" />
|
7
|
+
<title>The Big Bang Theory - First Season English subtitle -
|
8
|
+
Subscene</title>
|
9
|
+
<!--[if lt IE 9]>
|
10
|
+
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
11
|
+
<![endif]-->
|
12
|
+
|
13
|
+
<link rel="search" type="application/opensearchdescription+xml"
|
14
|
+
href="/opensearch.xml"
|
15
|
+
title="Subscene" />
|
16
|
+
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
|
17
|
+
|
18
|
+
<link href="/css?v=wAw70VBGnRTq9GRdRLK21UTVO497Q3o88suyqo3wtWs1"
|
19
|
+
rel="stylesheet"/>
|
20
|
+
|
21
|
+
|
22
|
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"
|
23
|
+
type="text/javascript"></script>
|
24
|
+
<script src="/jsUser?v=TNoxeNWFwaTgNuFjOlb-VqgErezBbck3r4lnsEAP87E1"></script>
|
25
|
+
|
26
|
+
</head>
|
27
|
+
<body>
|
28
|
+
<header>
|
29
|
+
<nav id="forum-navigation">
|
30
|
+
<ul>
|
31
|
+
<li>
|
32
|
+
<a href="http://v2.subscene.com/forums/default.aspx">Forums</a>
|
33
|
+
</li>
|
34
|
+
<li>
|
35
|
+
<a href="http://v2.subscene.com/">Old Version 2</a>
|
36
|
+
</li>
|
37
|
+
</ul>
|
38
|
+
</nav>
|
39
|
+
<nav id="user-navigation">
|
40
|
+
<ul>
|
41
|
+
<li>
|
42
|
+
<a href="http://subscene.com/u/182859">
|
43
|
+
javiersaldana
|
44
|
+
</a>
|
45
|
+
</li>
|
46
|
+
<li>
|
47
|
+
<a href="http://u.subscene.com/subtitles">My Subscene 0</a>
|
48
|
+
</li>
|
49
|
+
<li>
|
50
|
+
<a href="http://v2.subscene.com/user/conversations/default.aspx">Inbox</a>
|
51
|
+
</li>
|
52
|
+
<li>
|
53
|
+
<a href="http://v2.subscene.com/logout.aspx">Logout</a>
|
54
|
+
</li>
|
55
|
+
</ul>
|
56
|
+
</nav>
|
57
|
+
|
58
|
+
<div id="logo">
|
59
|
+
<a href="/"><em>Subscene 3.0 </em></a>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="search">
|
63
|
+
<div class="filter">
|
64
|
+
<ul>
|
65
|
+
(English)<li>
|
66
|
+
<a href="/filter?returnUrl=%2f136037" title="Edit subtitle
|
67
|
+
filter">Edit</a>
|
68
|
+
</li>
|
69
|
+
|
70
|
+
</ul>
|
71
|
+
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<form action="/subtitles/title.aspx">
|
75
|
+
|
76
|
+
<input type="text" name="q" id="q" class="text" />
|
77
|
+
|
78
|
+
<input type="hidden" name="l" id="l" class="text" value="" />
|
79
|
+
|
80
|
+
|
81
|
+
<button type="submit">Subtitle Search</button>
|
82
|
+
|
83
|
+
|
84
|
+
</form>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
|
88
|
+
<nav class="main">
|
89
|
+
<ul>
|
90
|
+
<li>
|
91
|
+
<a href="http://subscene.com/browse" class="" >Browse</a>
|
92
|
+
</li>
|
93
|
+
<li>
|
94
|
+
<a href="http://u.subscene.com/" >Upload</a>
|
95
|
+
</li>
|
96
|
+
</ul>
|
97
|
+
</nav>
|
98
|
+
</header>
|
99
|
+
<div id="content" class="clearfix">
|
100
|
+
|
101
|
+
|
102
|
+
<script type="text/javascript">
|
103
|
+
var model = null;
|
104
|
+
var downloadButtonText = "";
|
105
|
+
function DownloadSubtitle(downloadLink) {
|
106
|
+
var downloading = document.getElementById('downloading');
|
107
|
+
downloading.style.display = '';
|
108
|
+
|
109
|
+
if (downloadButtonText == "")
|
110
|
+
downloadButtonText = downloadLink.innerHTML;
|
111
|
+
|
112
|
+
downloadLink.innerHTML = downloadButtonText + "...";
|
113
|
+
|
114
|
+
if(model != null)
|
115
|
+
model.Show("True");
|
116
|
+
};
|
117
|
+
function CloseDownloading() {
|
118
|
+
var downloading = document.getElementById('downloading');
|
119
|
+
var downloadButton = document.getElementById('downloadButton');
|
120
|
+
|
121
|
+
if (downloading.style.display == '') {
|
122
|
+
downloading.style.display = 'none';
|
123
|
+
downloadButton.innerHTML = downloadButtonText;
|
124
|
+
}
|
125
|
+
};
|
126
|
+
|
127
|
+
function TogglePreview() {
|
128
|
+
var show = Toggle('preview');
|
129
|
+
|
130
|
+
if (show != undefined)
|
131
|
+
Set_Cookie("ShowSubtitlePreview", show ? "false" : "true");
|
132
|
+
};
|
133
|
+
function ToggleDetails() {
|
134
|
+
var show = Toggle('details');
|
135
|
+
|
136
|
+
if (show != undefined)
|
137
|
+
Set_Cookie("ShowSubtitleDetails", show ? "false" : "true");
|
138
|
+
};
|
139
|
+
function Toggle(name) {
|
140
|
+
var el = document.getElementById(name);
|
141
|
+
|
142
|
+
if (el.style.display == '')
|
143
|
+
el.style.display = 'none';
|
144
|
+
else
|
145
|
+
el.style.display = '';
|
146
|
+
|
147
|
+
CloseDownloading();
|
148
|
+
|
149
|
+
return el.style.display;
|
150
|
+
|
151
|
+
};
|
152
|
+
|
153
|
+
function SubtitleViewModel()
|
154
|
+
{
|
155
|
+
var self = this;
|
156
|
+
self.SubtitleId = 136037;
|
157
|
+
self.Rating = ko.observable(10);
|
158
|
+
self.RatingCssName = ko.observable(null); // Not used on index page. Do not
|
159
|
+
delete.
|
160
|
+
self.UserRating = ko.observable();
|
161
|
+
self.UserRatingDisplay = ko.observable('');
|
162
|
+
self.Show = ko.observable('False');
|
163
|
+
|
164
|
+
self.Rate = function (rating) {
|
165
|
+
AddRating(self, rating);
|
166
|
+
};
|
167
|
+
self.Undo = function () {
|
168
|
+
UndoRating(self);
|
169
|
+
};
|
170
|
+
self.ErrorMessage = ko.observable(null);
|
171
|
+
};
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
</script>
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
<div class="subtitle" itemscope itemtype="http://schema.org/Movie/Subtitle">
|
180
|
+
|
181
|
+
<div class="bread">
|
182
|
+
<a href="/subtitles/the-big-bang-theory-first-season" title="English The
|
183
|
+
Big Bang Theory - First Season subtitles">« back to subtitle
|
184
|
+
list </a>
|
185
|
+
</div>
|
186
|
+
<div class="box clearfix">
|
187
|
+
<div class="top right">
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
</div>
|
197
|
+
<div class="top left">
|
198
|
+
<a href="http://filmstone.com/film/the-big-bang-theory-first-season/poster"
|
199
|
+
target="_blank">
|
200
|
+
|
201
|
+
<div class="poster">
|
202
|
+
<img src="http://images.amazon.com/images/P/B000W91RUG.01.MZZZZZZZ.jpg"
|
203
|
+
alt="Poster" />
|
204
|
+
</div>
|
205
|
+
</a>
|
206
|
+
|
207
|
+
|
208
|
+
<li class="header">
|
209
|
+
<h1>
|
210
|
+
<span itemprop="name">
|
211
|
+
The Big Bang Theory - First Season
|
212
|
+
</span>
|
213
|
+
|
214
|
+
<a target="_blank" class="imdb"
|
215
|
+
href="http://www.imdb.com/title/tt898266">Imdb</a>
|
216
|
+
</h1>
|
217
|
+
<ul>
|
218
|
+
<li class="release">
|
219
|
+
<strong>Release info (8 CDs):
|
220
|
+
</strong>
|
221
|
+
The.Big.Bang.Theory.S01E01-08.HDTV.XviD-XOR</li>
|
222
|
+
<li class="author">
|
223
|
+
<a href="/u/26733">
|
224
|
+
rogard
|
225
|
+
|
226
|
+
<span class="rating-bar" title="Combined subtitle rating: 9">
|
227
|
+
<span class="good"></span>
|
228
|
+
<span class="good"></span>
|
229
|
+
<span class="good"></span>
|
230
|
+
<span class="good"></span>
|
231
|
+
<span class="good"></span>
|
232
|
+
<span class="good"></span>
|
233
|
+
<span class="good"></span>
|
234
|
+
<span class="good"></span>
|
235
|
+
<span class="good"></span>
|
236
|
+
<span class="neutral"></span>
|
237
|
+
</span>
|
238
|
+
|
239
|
+
</a>
|
240
|
+
</li>
|
241
|
+
<li class="comment-wrapper">
|
242
|
+
<div class="comment">
|
243
|
+
Episodes 1 to 8</div>
|
244
|
+
<nav class="comment-sub">
|
245
|
+
<ul>
|
246
|
+
<li>
|
247
|
+
<a href="javascript:ToggleDetails();">Subtitle details </a>
|
248
|
+
</li>
|
249
|
+
<li>
|
250
|
+
<a href="http://v2.subscene.com/forums/AddPost.aspx?ForumID=3&subtitleId=136037">Add
|
251
|
+
comment</a>
|
252
|
+
</li>
|
253
|
+
</ul>
|
254
|
+
</nav>
|
255
|
+
</li>
|
256
|
+
<li class="clearfix">
|
257
|
+
<a href="/Subtitle/Ratings?SubtitleId=136037&FilmUrlName=the-big-bang-theory-first-season">
|
258
|
+
<div class="rating-head">
|
259
|
+
Rated
|
260
|
+
</div>
|
261
|
+
<div class="rating positive hint hint--left" data-hint="By 5 --
|
262
|
+
--users">
|
263
|
+
|
264
|
+
<span>10</span>
|
265
|
+
</div></a>
|
266
|
+
<div>
|
267
|
+
|
268
|
+
<a href="/subtitle/download?mac=YLTKmewkUW-EsE9YHksE8LXDYN2b4yBreI8TJIBfpdxgMbaDY5jWnkHqZi70CwVF0"
|
269
|
+
rel="nofollow" onclick="DownloadSubtitle(this)"
|
270
|
+
id="downloadButton" class="button positive">Download English
|
271
|
+
Subtitle
|
272
|
+
|
273
|
+
</a>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
<div data-bind="visible: Show() == 'True'" class="user-rating">
|
277
|
+
<nav data-bind="visible: UserRating() == null" class="rate">
|
278
|
+
<ul>
|
279
|
+
<li>
|
280
|
+
<a data-bind="click: Rate.bind($data, 10)">Good</a>
|
281
|
+
</li>
|
282
|
+
<li>
|
283
|
+
<a data-bind="click: Rate.bind($data, 1)">Bad</a>
|
284
|
+
</li>
|
285
|
+
<li>
|
286
|
+
<a data-bind="click: Rate.bind($data, -1)">Fake</a>
|
287
|
+
</li>
|
288
|
+
</ul>
|
289
|
+
</nav>
|
290
|
+
|
291
|
+
<div data-bind="visible: UserRating() != null" class="rated">
|
292
|
+
You rated this <strong data-bind="text:
|
293
|
+
UserRatingDisplay()"></strong>
|
294
|
+
<span class="undo">
|
295
|
+
<a data-bind="click: Undo">Undo</a>
|
296
|
+
</span>
|
297
|
+
</div>
|
298
|
+
<div data-bind="visible: ErrorMessage() != null" class="error">
|
299
|
+
Error: <strong data-bind="text: ErrorMessage()"></strong>
|
300
|
+
</div>
|
301
|
+
|
302
|
+
</div>
|
303
|
+
<script type="text/javascript">
|
304
|
+
|
305
|
+
var model = new SubtitleViewModel();
|
306
|
+
ko.applyBindings(model);
|
307
|
+
|
308
|
+
</script>
|
309
|
+
|
310
|
+
|
311
|
+
</li>
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
</ul>
|
316
|
+
|
317
|
+
</div>
|
318
|
+
</div>
|
319
|
+
|
320
|
+
</div>
|
321
|
+
|
322
|
+
<div class="clearfix">
|
323
|
+
|
324
|
+
<div class="window" style='display: none' id='downloading'>
|
325
|
+
<div class="close">
|
326
|
+
<a href="javascript:CloseDownloading();"></a>
|
327
|
+
</div>
|
328
|
+
<h3>
|
329
|
+
Subtitle downloading...</h3>
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
</div>
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
<div class="details">
|
344
|
+
|
345
|
+
|
346
|
+
<div class="window" style='display:none;' id='details'>
|
347
|
+
<div class="close">
|
348
|
+
<a href="javascript:ToggleDetails();"></a>
|
349
|
+
</div>
|
350
|
+
<h3>Subtitle details:</h3>
|
351
|
+
<ul>
|
352
|
+
<li>
|
353
|
+
<strong>Online:</strong>
|
354
|
+
3/19/2008 5:24 AM
|
355
|
+
</li>
|
356
|
+
<li>
|
357
|
+
<strong>Hearing Impaired:</strong>
|
358
|
+
No
|
359
|
+
</li>
|
360
|
+
<li>
|
361
|
+
<strong>Foreign parts:</strong>
|
362
|
+
No</li>
|
363
|
+
<li>
|
364
|
+
<strong>Framerate:</strong>
|
365
|
+
23.976
|
366
|
+
</li>
|
367
|
+
<li>
|
368
|
+
<strong>Files:</strong>
|
369
|
+
(96,780
|
370
|
+
bytes)
|
371
|
+
</li>
|
372
|
+
<li>
|
373
|
+
<strong>Production type:</strong>
|
374
|
+
Not available
|
375
|
+
</li>
|
376
|
+
|
377
|
+
|
378
|
+
<li>
|
379
|
+
---------------------------------------
|
380
|
+
</li>
|
381
|
+
<li itemprop="aggregateRating" itemscope
|
382
|
+
itemtype="http://schema.org/AggregateRating">
|
383
|
+
<strong>Rated:</strong>
|
384
|
+
<span itemprop="ratingValue">10</span>/<span itemprop="bestRating">10</span>
|
385
|
+
from
|
386
|
+
<a href="/Subtitle/Ratings?SubtitleId=136037&FilmUrlName=the-big-bang-theory-first-season"
|
387
|
+
title="View Ratings">
|
388
|
+
<span itemprop="ratingCount">5</span> users
|
389
|
+
</a>
|
390
|
+
|
391
|
+
</li>
|
392
|
+
<li>
|
393
|
+
<strong>Voted as fake by:</strong>
|
394
|
+
0 users
|
395
|
+
</li>
|
396
|
+
<li>
|
397
|
+
<strong>Downloads:</strong>
|
398
|
+
11,972
|
399
|
+
</li>
|
400
|
+
</ul>
|
401
|
+
</div>
|
402
|
+
</div>
|
403
|
+
|
404
|
+
</div>
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
</div>
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
<div class="bottom">
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
</div>
|
418
|
+
|
419
|
+
</div>
|
420
|
+
|
421
|
+
|
422
|
+
<footer>
|
423
|
+
<div class="right align-right">
|
424
|
+
Thanks to <a href="http://tmdb.org">The Movie DB</a>
|
425
|
+
and <a href="http://thetvdb.com/">The TVDB</a> for images.
|
426
|
+
<p>
|
427
|
+
Design by <a href="http://imyourfriend.dk/">Im Your Friend</a>.
|
428
|
+
|
429
|
+
</p>
|
430
|
+
</div>
|
431
|
+
<div class="right">
|
432
|
+
</div>
|
433
|
+
|
434
|
+
<div>
|
435
|
+
<div class="copyright">
|
436
|
+
© 2013 Subscene <span class="version">(Version 3.5.6)</span>
|
437
|
+
</div>
|
438
|
+
<nav>
|
439
|
+
<ul>
|
440
|
+
<li>
|
441
|
+
<div class="twitter">
|
442
|
+
<a href="https://twitter.com/subscene_com"
|
443
|
+
class="twitter-follow-button">@subscene_com</a>
|
444
|
+
</div>
|
445
|
+
</li>
|
446
|
+
|
447
|
+
<li>
|
448
|
+
<a href="http://v2.subscene.com/base/sponsor.aspx">Support
|
449
|
+
Subscene</a>
|
450
|
+
</li>
|
451
|
+
<li>
|
452
|
+
<a href="/site/legal-information">Legal Information</a>
|
453
|
+
</li>
|
454
|
+
</ul>
|
455
|
+
</nav>
|
456
|
+
</div>
|
457
|
+
<script type="text/javascript">
|
458
|
+
|
459
|
+
var _gaq = _gaq || [];
|
460
|
+
_gaq.push(['_setAccount', 'UA-340707-2']);
|
461
|
+
_gaq.push(['_trackPageview']);
|
462
|
+
|
463
|
+
(function () {
|
464
|
+
var ga = document.createElement('script'); ga.type = 'text/javascript';
|
465
|
+
ga.async = true;
|
466
|
+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
|
467
|
+
'http://www') + '.google-analytics.com/ga.js';
|
468
|
+
var s = document.getElementsByTagName('script')[0];
|
469
|
+
s.parentNode.insertBefore(ga, s);
|
470
|
+
})();
|
471
|
+
|
472
|
+
</script>
|
473
|
+
<script type="text/javascript">
|
474
|
+
if (top.location != location) {
|
475
|
+
top.location.href = document.location.href;
|
476
|
+
}
|
477
|
+
</script>
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
</footer>
|
482
|
+
|
483
|
+
|
484
|
+
</body>
|
485
|
+
</html>
|