play_scrape 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -18
- data/lib/play_scrape.rb +6 -1
- data/lib/play_scrape/version.rb +1 -1
- 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: 07e15ca894bb06b5864dec0e1ae2de63c17a3f91
|
4
|
+
data.tar.gz: b76aff480f911bc9642884fa852c4d00c258b9d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e253264b1460d19dcec74c30044c510f42deb729a98474bd54c6c40340976440cd6ae0869cd385b2f9980561c57b5da7905df23f468e2dc950fdafaba4d35f7
|
7
|
+
data.tar.gz: fab1f86e52f34dd3383ef84bd5397c4ae24cb1633fe41abd63202ab75e584fdcd0801fa36fa9b01b36f79d040057768a7eaa19cc1ccf6bfae9f6f7f505a41fd9
|
data/README.md
CHANGED
@@ -1,29 +1,22 @@
|
|
1
1
|
# PlayScrape
|
2
2
|
|
3
|
-
|
3
|
+
Very simple scraper for the PlayStore for some essential info.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
7
|
gem 'play_scrape'
|
10
8
|
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
14
|
-
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install play_scrape
|
18
|
-
|
19
9
|
## Usage
|
20
10
|
|
21
|
-
|
11
|
+
app_info = PlayScrape.scrape_app_info(package_name_of_android_app)
|
22
12
|
|
23
|
-
|
13
|
+
app_info.app_name
|
14
|
+
app_info.description
|
15
|
+
app_info.rating
|
16
|
+
app_info.num_ratings
|
17
|
+
app_info.dev_url
|
18
|
+
app_info.icon_url
|
19
|
+
app_info.min_installs
|
20
|
+
app_info.max_installs
|
21
|
+
app_info.version
|
24
22
|
|
25
|
-
1. Fork it
|
26
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
-
5. Create new Pull Request
|
data/lib/play_scrape.rb
CHANGED
@@ -69,7 +69,12 @@ module PlayScrape
|
|
69
69
|
res = self.get_html_page_for(package_name)
|
70
70
|
if res
|
71
71
|
html = Nokogiri::HTML(res.body)
|
72
|
-
html.css(APP_ICON_CSS_PATH).first
|
72
|
+
icon = html.css(APP_ICON_CSS_PATH).first
|
73
|
+
if icon
|
74
|
+
icon.attributes['src'].value
|
75
|
+
else
|
76
|
+
nil
|
77
|
+
end
|
73
78
|
else
|
74
79
|
nil
|
75
80
|
end
|
data/lib/play_scrape/version.rb
CHANGED