rfilma 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rfilma/crawlerdb.rb +2 -2
- data/lib/rfilma.rb +2 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e4b5c51c36e8d55247605045a90ed92f401fd60
|
4
|
+
data.tar.gz: 440da1329750784f9219dee5cf092709e6445900
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7881daebeb80ce59c95384210224cda66d44fe8863c131b370ac39f2423d21b2477df754880881ae3efa882d160f9f31f479cc6fa61e6f17bd9833e967d74cfb
|
7
|
+
data.tar.gz: 4a9e69a37275c010625fc907ea8f6cb952713715877b4b75ef3d06f150bfc3db9a451cc193cd75cc09954bbe565553181763952d32248f58287bee79c783d786
|
data/lib/rfilma/crawlerdb.rb
CHANGED
@@ -11,8 +11,8 @@ class CrawlerDB < Crawler
|
|
11
11
|
Pelicula.where(id: id).as_json
|
12
12
|
end
|
13
13
|
|
14
|
-
def buscar_por_titulo(titulo)
|
15
|
-
Pelicula.where(titulo: /#{titulo}/i).as_json
|
14
|
+
def buscar_por_titulo(titulo,nlim=30)
|
15
|
+
Pelicula.where(titulo: /#{titulo}/i).limit(nlim).as_json
|
16
16
|
end
|
17
17
|
|
18
18
|
def guardar_pelicula(id)
|
data/lib/rfilma.rb
CHANGED
@@ -2,13 +2,12 @@ require "rfilma/crawler"
|
|
2
2
|
require "rfilma/crawlerdb"
|
3
3
|
require "rfilma/pelicula"
|
4
4
|
|
5
|
-
class RFilma
|
6
|
-
|
7
|
-
attr_accessor :crawler, :crawlerdb
|
5
|
+
class RFilma
|
8
6
|
|
9
7
|
def initialize
|
10
8
|
@crawler = Crawler.new
|
11
9
|
@crawlerdb = CrawlerDB.new
|
10
|
+
return true
|
12
11
|
end
|
13
12
|
|
14
13
|
def buscar_por_titulo(titulo,web=false)
|