quick_scrapper 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +41 -0
- data/lib/quick_scrapper/version.rb +1 -1
- metadata +4 -3
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
quick_scrapper
|
2
|
+
==============
|
3
|
+
|
4
|
+
`quick_scrapper` scraps the selection associated to css_selector from a given page. `quick_scrapper` uses the `scrapi` library to do the scraping, avoiding all the complicated methid calls. Just one method to do all the scraping required!!
|
5
|
+
|
6
|
+
|
7
|
+
Installation
|
8
|
+
------------
|
9
|
+
|
10
|
+
The installation slighly deffers for Ruby 1.9 and 1.8.
|
11
|
+
|
12
|
+
For Ruby 1.9 and higher, the installation is as simple as running:
|
13
|
+
|
14
|
+
gem install quick_scrapper
|
15
|
+
|
16
|
+
However the latest version of the dependency gem `scrapi` does not have
|
17
|
+
backward compatibility with 1.8.x. So, for Ruby 1.8.x, the installation can be
|
18
|
+
carried out by running:
|
19
|
+
|
20
|
+
gem install scrapi -v 1.2.0
|
21
|
+
gem install quick_scrapper
|
22
|
+
|
23
|
+
Usage
|
24
|
+
-----
|
25
|
+
|
26
|
+
require 'rubygems'
|
27
|
+
require 'quick_scrapper'
|
28
|
+
|
29
|
+
You may scrap for a `css_selector` in a webpage with url `page url` by running:
|
30
|
+
|
31
|
+
QuickScrapper.scrap(`page url`, `css_selector`)
|
32
|
+
|
33
|
+
For example, you may run:
|
34
|
+
|
35
|
+
QuickScrapper.scrap("http://bvsatyaram.com", div.priceAvail>div>div.PriceCompare>div.BodyS")
|
36
|
+
|
37
|
+
Author
|
38
|
+
------
|
39
|
+
|
40
|
+
B V Satyaram <[bvsatyaram.com](http://bvsatyaram.com)>
|
41
|
+
|
metadata
CHANGED
@@ -3,10 +3,10 @@ name: quick_scrapper
|
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
|
+
- 1
|
6
7
|
- 0
|
7
8
|
- 0
|
8
|
-
|
9
|
-
version: 0.0.1
|
9
|
+
version: 1.0.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Satyaram B V
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-05-04 00:00:00 +05:30
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -41,6 +41,7 @@ extra_rdoc_files: []
|
|
41
41
|
files:
|
42
42
|
- .gitignore
|
43
43
|
- Gemfile
|
44
|
+
- README.md
|
44
45
|
- Rakefile
|
45
46
|
- lib/quick_scrapper.rb
|
46
47
|
- lib/quick_scrapper/version.rb
|