google_movies47 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/google_movies47/parser.rb +5 -5
- data/lib/google_movies47/version.rb +1 -1
- metadata +2 -2
@@ -19,15 +19,14 @@ module GoogleMovies47
|
|
19
19
|
theater_elements = doc.xpath(
|
20
20
|
"//div[@class='movie_results']/div[@class='theater' and .//h2/a]"
|
21
21
|
)
|
22
|
-
|
23
|
-
|
22
|
+
x = 0
|
23
|
+
y = 0
|
24
24
|
theater_elements.each do |t|
|
25
25
|
theater_name = t.search(".//h2[@class='name']/a/text()").text
|
26
26
|
theater_info = t.search(".//div[@class='info']/text()").text
|
27
27
|
showtimes = []
|
28
|
-
@movies = []
|
29
|
-
x = 0
|
30
28
|
movie_elements = t.search(".//div[@class='showtimes']//div[@class='movie']")
|
29
|
+
|
31
30
|
movie_elements.each do |m|
|
32
31
|
movie_name = m.search(".//div[@class='name']/a/text()").text.strip
|
33
32
|
movie_info_line = m.search(".//span[@class='info']/text()").text
|
@@ -46,7 +45,8 @@ module GoogleMovies47
|
|
46
45
|
x = x + 1
|
47
46
|
end
|
48
47
|
|
49
|
-
@theaters
|
48
|
+
@theaters[y] = { :name => theater_name, :info => theater_info, :movies => showtimes }
|
49
|
+
y = y + 1
|
50
50
|
end
|
51
51
|
|
52
52
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_movies47
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-07-
|
13
|
+
date: 2012-07-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mechanize
|