google_play_search 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -18,8 +18,8 @@ module GooglePlaySearch
|
|
18
18
|
app.category = get_category app_content
|
19
19
|
app.logo_url = get_logo_url app_content
|
20
20
|
app.short_description = get_short_description app_content
|
21
|
-
|
22
|
-
|
21
|
+
app.rating = get_app_rating app_content
|
22
|
+
app.reviews = get_app_reviews app_content
|
23
23
|
app_search_result_list << app
|
24
24
|
end
|
25
25
|
app_search_result_list
|
@@ -54,16 +54,22 @@ module GooglePlaySearch
|
|
54
54
|
app_content.css("div.description").first.content
|
55
55
|
end
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
57
|
+
def get_app_rating(app_content)
|
58
|
+
ratings = app_content.css("div.ratings")
|
59
|
+
if ratings && ratings.size > 0
|
60
|
+
rating_str = ratings.first['title']
|
61
|
+
unless rating_str.empty?
|
62
|
+
return rating_str[/\d+\.?\d?/].to_f
|
63
|
+
end
|
64
|
+
return 0
|
65
|
+
end
|
66
|
+
end
|
64
67
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
+
def get_app_reviews(app_content)
|
69
|
+
reviews = app_content.css("span.snippet-reviews")
|
70
|
+
if reviews && reviews.size > 0
|
71
|
+
reviews.first.content[1..-2].gsub(',','').to_i
|
72
|
+
end
|
73
|
+
end
|
68
74
|
end
|
69
75
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_play_search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Grant Chen
|
@@ -42,9 +42,9 @@ extensions: []
|
|
42
42
|
extra_rdoc_files: []
|
43
43
|
|
44
44
|
files:
|
45
|
+
- lib/google_play_search/app_parser.rb
|
45
46
|
- lib/google_play_search/search.rb
|
46
47
|
- lib/google_play_search/app.rb
|
47
|
-
- lib/google_play_search/app_parser.rb
|
48
48
|
- lib/google_play_search.rb
|
49
49
|
homepage: https://github.com/kucss/google_play_search
|
50
50
|
licenses: []
|
@@ -75,9 +75,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
75
|
requirements: []
|
76
76
|
|
77
77
|
rubyforge_project:
|
78
|
-
rubygems_version: 1.8.
|
78
|
+
rubygems_version: 1.8.24
|
79
79
|
signing_key:
|
80
80
|
specification_version: 3
|
81
81
|
summary: google play market search
|
82
82
|
test_files: []
|
83
83
|
|
84
|
+
has_rdoc:
|