osdb 0.0.10 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/getsub +122 -160
- data/lib/osdb.rb +10 -5
- data/lib/osdb/finder.rb +8 -0
- data/lib/osdb/finder/first.rb +13 -0
- data/lib/osdb/finder/interactive.rb +21 -0
- data/lib/osdb/finder/score.rb +13 -0
- data/lib/osdb/movie.rb +8 -53
- data/lib/osdb/movie_file.rb +61 -0
- data/lib/osdb/search.rb +9 -0
- data/lib/osdb/search/imdb.rb +24 -0
- data/lib/osdb/search/movie_hash.rb +21 -0
- data/lib/osdb/search/name.rb +28 -0
- data/lib/osdb/search/path.rb +20 -0
- data/lib/osdb/selector.rb +7 -0
- data/lib/osdb/selector/format.rb +17 -0
- data/lib/osdb/selector/movie.rb +31 -0
- data/lib/osdb/server.rb +4 -0
- data/lib/osdb/subtitle_finder.rb +31 -0
- data/lib/osdb/version.rb +1 -1
- data/osdb.gemspec +2 -0
- data/spec/fixtures/http/check_movie_hash.yml +225 -0
- data/spec/fixtures/http/get_imdb_movie_details.yml +342 -0
- data/spec/fixtures/http/log_in.yml +86 -0
- data/spec/fixtures/http/log_out.yml +68 -0
- data/spec/fixtures/http/search_imdb.yml +761 -0
- data/spec/fixtures/http/search_subtitles_for_himym.yml +1189 -0
- data/spec/fixtures/http/search_subtitles_for_the_rock.yml +4124 -0
- data/spec/fixtures/http/server_info.yml +492 -0
- data/spec/osdb/{movie_spec.rb → movie_file_spec.rb} +2 -2
- data/spec/osdb/server_spec.rb +61 -36
- data/spec/spec_helper.rb +9 -1
- metadata +87 -9
@@ -0,0 +1,492 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api.opensubtitles.org/xml-rpc
|
6
|
+
body:
|
7
|
+
string: |
|
8
|
+
<?xml version="1.0" ?><methodCall><methodName>ServerInfo</methodName><params/></methodCall>
|
9
|
+
|
10
|
+
headers:
|
11
|
+
Accept:
|
12
|
+
- "*/*"
|
13
|
+
Content-Length:
|
14
|
+
- "92"
|
15
|
+
User-Agent:
|
16
|
+
- XMLRPC::Client (Ruby 1.8.7)
|
17
|
+
Content-Type:
|
18
|
+
- text/xml; charset=utf-8
|
19
|
+
Connection:
|
20
|
+
- keep-alive
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 200
|
24
|
+
message: OK
|
25
|
+
headers:
|
26
|
+
X-Cache:
|
27
|
+
- MISS
|
28
|
+
Age:
|
29
|
+
- "0"
|
30
|
+
X-Cache-Backend:
|
31
|
+
- www
|
32
|
+
Content-Length:
|
33
|
+
- "9664"
|
34
|
+
Content-Type:
|
35
|
+
- text/xml
|
36
|
+
Connection:
|
37
|
+
- keep-alive
|
38
|
+
Accept-Ranges:
|
39
|
+
- bytes
|
40
|
+
Date:
|
41
|
+
- Sun, 04 Nov 2012 17:11:32 GMT
|
42
|
+
body:
|
43
|
+
string: |
|
44
|
+
<?xml version="1.0" encoding="utf-8"?>
|
45
|
+
<methodResponse>
|
46
|
+
<params>
|
47
|
+
<param>
|
48
|
+
<value>
|
49
|
+
<struct>
|
50
|
+
<member>
|
51
|
+
<name>xmlrpc_version</name>
|
52
|
+
<value>
|
53
|
+
<string>0.1</string>
|
54
|
+
</value>
|
55
|
+
</member>
|
56
|
+
<member>
|
57
|
+
<name>xmlrpc_url</name>
|
58
|
+
<value>
|
59
|
+
<string>http://api.opensubtitles.org/xml-rpc</string>
|
60
|
+
</value>
|
61
|
+
</member>
|
62
|
+
<member>
|
63
|
+
<name>application</name>
|
64
|
+
<value>
|
65
|
+
<string>OpenSuber v0.2</string>
|
66
|
+
</value>
|
67
|
+
</member>
|
68
|
+
<member>
|
69
|
+
<name>contact</name>
|
70
|
+
<value>
|
71
|
+
<string>admin@opensubtitles.org</string>
|
72
|
+
</value>
|
73
|
+
</member>
|
74
|
+
<member>
|
75
|
+
<name>website_url</name>
|
76
|
+
<value>
|
77
|
+
<string>http://www.opensubtitles.org</string>
|
78
|
+
</value>
|
79
|
+
</member>
|
80
|
+
<member>
|
81
|
+
<name>users_online_total</name>
|
82
|
+
<value>
|
83
|
+
<int>13570</int>
|
84
|
+
</value>
|
85
|
+
</member>
|
86
|
+
<member>
|
87
|
+
<name>users_online_program</name>
|
88
|
+
<value>
|
89
|
+
<int>10099</int>
|
90
|
+
</value>
|
91
|
+
</member>
|
92
|
+
<member>
|
93
|
+
<name>users_loggedin</name>
|
94
|
+
<value>
|
95
|
+
<int>127</int>
|
96
|
+
</value>
|
97
|
+
</member>
|
98
|
+
<member>
|
99
|
+
<name>users_max_alltime</name>
|
100
|
+
<value>
|
101
|
+
<string>27449</string>
|
102
|
+
</value>
|
103
|
+
</member>
|
104
|
+
<member>
|
105
|
+
<name>users_registered</name>
|
106
|
+
<value>
|
107
|
+
<string>1025281</string>
|
108
|
+
</value>
|
109
|
+
</member>
|
110
|
+
<member>
|
111
|
+
<name>subs_downloads</name>
|
112
|
+
<value>
|
113
|
+
<string>766307871</string>
|
114
|
+
</value>
|
115
|
+
</member>
|
116
|
+
<member>
|
117
|
+
<name>subs_subtitle_files</name>
|
118
|
+
<value>
|
119
|
+
<string>1864635</string>
|
120
|
+
</value>
|
121
|
+
</member>
|
122
|
+
<member>
|
123
|
+
<name>movies_total</name>
|
124
|
+
<value>
|
125
|
+
<string>136467</string>
|
126
|
+
</value>
|
127
|
+
</member>
|
128
|
+
<member>
|
129
|
+
<name>movies_aka</name>
|
130
|
+
<value>
|
131
|
+
<string>277764</string>
|
132
|
+
</value>
|
133
|
+
</member>
|
134
|
+
<member>
|
135
|
+
<name>total_subtitles_languages</name>
|
136
|
+
<value>
|
137
|
+
<string>61</string>
|
138
|
+
</value>
|
139
|
+
</member>
|
140
|
+
<member>
|
141
|
+
<name>last_update_strings</name>
|
142
|
+
<value>
|
143
|
+
<struct>
|
144
|
+
<member>
|
145
|
+
<name>ar</name>
|
146
|
+
<value>
|
147
|
+
<string>2007-02-03 21:36:14</string>
|
148
|
+
</value>
|
149
|
+
</member>
|
150
|
+
<member>
|
151
|
+
<name>bg</name>
|
152
|
+
<value>
|
153
|
+
<string>2007-02-03 21:36:14</string>
|
154
|
+
</value>
|
155
|
+
</member>
|
156
|
+
<member>
|
157
|
+
<name>ca</name>
|
158
|
+
<value>
|
159
|
+
<string>2009-07-06 06:20:41</string>
|
160
|
+
</value>
|
161
|
+
</member>
|
162
|
+
<member>
|
163
|
+
<name>cs</name>
|
164
|
+
<value>
|
165
|
+
<string>2007-02-03 21:36:15</string>
|
166
|
+
</value>
|
167
|
+
</member>
|
168
|
+
<member>
|
169
|
+
<name>da</name>
|
170
|
+
<value>
|
171
|
+
<string>2007-02-16 14:07:42</string>
|
172
|
+
</value>
|
173
|
+
</member>
|
174
|
+
<member>
|
175
|
+
<name>de</name>
|
176
|
+
<value>
|
177
|
+
<string>2007-02-03 21:36:15</string>
|
178
|
+
</value>
|
179
|
+
</member>
|
180
|
+
<member>
|
181
|
+
<name>el</name>
|
182
|
+
<value>
|
183
|
+
<string>2007-02-03 21:36:17</string>
|
184
|
+
</value>
|
185
|
+
</member>
|
186
|
+
<member>
|
187
|
+
<name>en</name>
|
188
|
+
<value>
|
189
|
+
<string>2007-02-03 21:36:14</string>
|
190
|
+
</value>
|
191
|
+
</member>
|
192
|
+
<member>
|
193
|
+
<name>es</name>
|
194
|
+
<value>
|
195
|
+
<string>2007-02-03 21:36:21</string>
|
196
|
+
</value>
|
197
|
+
</member>
|
198
|
+
<member>
|
199
|
+
<name>et</name>
|
200
|
+
<value>
|
201
|
+
<string>2007-05-07 20:43:40</string>
|
202
|
+
</value>
|
203
|
+
</member>
|
204
|
+
<member>
|
205
|
+
<name>eu</name>
|
206
|
+
<value>
|
207
|
+
<string>2011-08-28 08:37:00</string>
|
208
|
+
</value>
|
209
|
+
</member>
|
210
|
+
<member>
|
211
|
+
<name>fa</name>
|
212
|
+
<value>
|
213
|
+
<string>2007-02-03 21:36:16</string>
|
214
|
+
</value>
|
215
|
+
</member>
|
216
|
+
<member>
|
217
|
+
<name>fi</name>
|
218
|
+
<value>
|
219
|
+
<string>2007-02-03 21:36:16</string>
|
220
|
+
</value>
|
221
|
+
</member>
|
222
|
+
<member>
|
223
|
+
<name>fr</name>
|
224
|
+
<value>
|
225
|
+
<string>2007-02-03 21:36:16</string>
|
226
|
+
</value>
|
227
|
+
</member>
|
228
|
+
<member>
|
229
|
+
<name>gl</name>
|
230
|
+
<value>
|
231
|
+
<string>2007-10-11 16:23:40</string>
|
232
|
+
</value>
|
233
|
+
</member>
|
234
|
+
<member>
|
235
|
+
<name>he</name>
|
236
|
+
<value>
|
237
|
+
<string>2007-02-03 21:36:17</string>
|
238
|
+
</value>
|
239
|
+
</member>
|
240
|
+
<member>
|
241
|
+
<name>hi</name>
|
242
|
+
<value>
|
243
|
+
<string>2011-11-07 09:54:58</string>
|
244
|
+
</value>
|
245
|
+
</member>
|
246
|
+
<member>
|
247
|
+
<name>hr</name>
|
248
|
+
<value>
|
249
|
+
<string>2007-02-04 11:05:51</string>
|
250
|
+
</value>
|
251
|
+
</member>
|
252
|
+
<member>
|
253
|
+
<name>hu</name>
|
254
|
+
<value>
|
255
|
+
<string>2007-02-03 21:36:17</string>
|
256
|
+
</value>
|
257
|
+
</member>
|
258
|
+
<member>
|
259
|
+
<name>id</name>
|
260
|
+
<value>
|
261
|
+
<string>2007-02-03 21:36:18</string>
|
262
|
+
</value>
|
263
|
+
</member>
|
264
|
+
<member>
|
265
|
+
<name>is</name>
|
266
|
+
<value>
|
267
|
+
<string>2011-01-04 20:33:08</string>
|
268
|
+
</value>
|
269
|
+
</member>
|
270
|
+
<member>
|
271
|
+
<name>it</name>
|
272
|
+
<value>
|
273
|
+
<string>2007-02-03 21:36:18</string>
|
274
|
+
</value>
|
275
|
+
</member>
|
276
|
+
<member>
|
277
|
+
<name>ja</name>
|
278
|
+
<value>
|
279
|
+
<string>2007-02-04 11:05:11</string>
|
280
|
+
</value>
|
281
|
+
</member>
|
282
|
+
<member>
|
283
|
+
<name>ka</name>
|
284
|
+
<value>
|
285
|
+
<string>2007-06-09 17:08:29</string>
|
286
|
+
</value>
|
287
|
+
</member>
|
288
|
+
<member>
|
289
|
+
<name>km</name>
|
290
|
+
<value>
|
291
|
+
<string>2011-12-31 03:57:52</string>
|
292
|
+
</value>
|
293
|
+
</member>
|
294
|
+
<member>
|
295
|
+
<name>ko</name>
|
296
|
+
<value>
|
297
|
+
<string>2007-02-04 11:05:16</string>
|
298
|
+
</value>
|
299
|
+
</member>
|
300
|
+
<member>
|
301
|
+
<name>mk</name>
|
302
|
+
<value>
|
303
|
+
<string>2007-12-06 10:45:07</string>
|
304
|
+
</value>
|
305
|
+
</member>
|
306
|
+
<member>
|
307
|
+
<name>ms</name>
|
308
|
+
<value>
|
309
|
+
<string>2009-04-18 09:08:07</string>
|
310
|
+
</value>
|
311
|
+
</member>
|
312
|
+
<member>
|
313
|
+
<name>nl</name>
|
314
|
+
<value>
|
315
|
+
<string>2007-02-03 21:36:15</string>
|
316
|
+
</value>
|
317
|
+
</member>
|
318
|
+
<member>
|
319
|
+
<name>no</name>
|
320
|
+
<value>
|
321
|
+
<string>2007-02-03 21:36:18</string>
|
322
|
+
</value>
|
323
|
+
</member>
|
324
|
+
<member>
|
325
|
+
<name>oc</name>
|
326
|
+
<value>
|
327
|
+
<string>2008-12-16 12:56:29</string>
|
328
|
+
</value>
|
329
|
+
</member>
|
330
|
+
<member>
|
331
|
+
<name>pb</name>
|
332
|
+
<value>
|
333
|
+
<string>2007-02-03 21:36:19</string>
|
334
|
+
</value>
|
335
|
+
</member>
|
336
|
+
<member>
|
337
|
+
<name>pl</name>
|
338
|
+
<value>
|
339
|
+
<string>2007-02-03 21:36:19</string>
|
340
|
+
</value>
|
341
|
+
</member>
|
342
|
+
<member>
|
343
|
+
<name>pt</name>
|
344
|
+
<value>
|
345
|
+
<string>2007-02-03 21:36:19</string>
|
346
|
+
</value>
|
347
|
+
</member>
|
348
|
+
<member>
|
349
|
+
<name>ro</name>
|
350
|
+
<value>
|
351
|
+
<string>2007-02-03 21:36:20</string>
|
352
|
+
</value>
|
353
|
+
</member>
|
354
|
+
<member>
|
355
|
+
<name>ru</name>
|
356
|
+
<value>
|
357
|
+
<string>2007-02-03 21:36:20</string>
|
358
|
+
</value>
|
359
|
+
</member>
|
360
|
+
<member>
|
361
|
+
<name>si</name>
|
362
|
+
<value>
|
363
|
+
<string>2009-08-09 10:06:20</string>
|
364
|
+
</value>
|
365
|
+
</member>
|
366
|
+
<member>
|
367
|
+
<name>sk</name>
|
368
|
+
<value>
|
369
|
+
<string>2007-02-03 21:36:20</string>
|
370
|
+
</value>
|
371
|
+
</member>
|
372
|
+
<member>
|
373
|
+
<name>sl</name>
|
374
|
+
<value>
|
375
|
+
<string>2008-08-26 08:39:30</string>
|
376
|
+
</value>
|
377
|
+
</member>
|
378
|
+
<member>
|
379
|
+
<name>sq</name>
|
380
|
+
<value>
|
381
|
+
<string>2008-03-06 19:11:57</string>
|
382
|
+
</value>
|
383
|
+
</member>
|
384
|
+
<member>
|
385
|
+
<name>sr</name>
|
386
|
+
<value>
|
387
|
+
<string>2007-09-05 10:16:25</string>
|
388
|
+
</value>
|
389
|
+
</member>
|
390
|
+
<member>
|
391
|
+
<name>sv</name>
|
392
|
+
<value>
|
393
|
+
<string>2007-02-03 21:36:21</string>
|
394
|
+
</value>
|
395
|
+
</member>
|
396
|
+
<member>
|
397
|
+
<name>th</name>
|
398
|
+
<value>
|
399
|
+
<string>2007-06-28 10:37:46</string>
|
400
|
+
</value>
|
401
|
+
</member>
|
402
|
+
<member>
|
403
|
+
<name>tl</name>
|
404
|
+
<value>
|
405
|
+
<string>2009-08-24 16:32:10</string>
|
406
|
+
</value>
|
407
|
+
</member>
|
408
|
+
<member>
|
409
|
+
<name>tr</name>
|
410
|
+
<value>
|
411
|
+
<string>2007-02-03 21:36:22</string>
|
412
|
+
</value>
|
413
|
+
</member>
|
414
|
+
<member>
|
415
|
+
<name>uk</name>
|
416
|
+
<value>
|
417
|
+
<string>2010-03-22 10:14:26</string>
|
418
|
+
</value>
|
419
|
+
</member>
|
420
|
+
<member>
|
421
|
+
<name>vi</name>
|
422
|
+
<value>
|
423
|
+
<string>2007-02-04 11:05:03</string>
|
424
|
+
</value>
|
425
|
+
</member>
|
426
|
+
<member>
|
427
|
+
<name>zh</name>
|
428
|
+
<value>
|
429
|
+
<string>2007-02-04 11:05:27</string>
|
430
|
+
</value>
|
431
|
+
</member>
|
432
|
+
</struct>
|
433
|
+
</value>
|
434
|
+
</member>
|
435
|
+
<member>
|
436
|
+
<name>download_limits</name>
|
437
|
+
<value>
|
438
|
+
<struct>
|
439
|
+
<member>
|
440
|
+
<name>global_24h_download_limit</name>
|
441
|
+
<value>
|
442
|
+
<int>200</int>
|
443
|
+
</value>
|
444
|
+
</member>
|
445
|
+
<member>
|
446
|
+
<name>client_ip</name>
|
447
|
+
<value>
|
448
|
+
<string>80.30.33.21</string>
|
449
|
+
</value>
|
450
|
+
</member>
|
451
|
+
<member>
|
452
|
+
<name>limit_check_by</name>
|
453
|
+
<value>
|
454
|
+
<string>user_ip</string>
|
455
|
+
</value>
|
456
|
+
</member>
|
457
|
+
<member>
|
458
|
+
<name>client_24h_download_count</name>
|
459
|
+
<value>
|
460
|
+
<int>1</int>
|
461
|
+
</value>
|
462
|
+
</member>
|
463
|
+
<member>
|
464
|
+
<name>client_download_quota</name>
|
465
|
+
<value>
|
466
|
+
<int>199</int>
|
467
|
+
</value>
|
468
|
+
</member>
|
469
|
+
<member>
|
470
|
+
<name>client_24h_download_limit</name>
|
471
|
+
<value>
|
472
|
+
<int>200</int>
|
473
|
+
</value>
|
474
|
+
</member>
|
475
|
+
</struct>
|
476
|
+
</value>
|
477
|
+
</member>
|
478
|
+
<member>
|
479
|
+
<name>seconds</name>
|
480
|
+
<value>
|
481
|
+
<double>0.149</double>
|
482
|
+
</value>
|
483
|
+
</member>
|
484
|
+
</struct>
|
485
|
+
</value>
|
486
|
+
</param>
|
487
|
+
</params>
|
488
|
+
</methodResponse>
|
489
|
+
|
490
|
+
http_version:
|
491
|
+
recorded_at: Sun, 04 Nov 2012 17:11:32 GMT
|
492
|
+
recorded_with: VCR 2.3.0
|