gsearch-parser 0.3.0 → 0.3.1
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 +32 -29
- data/VERSION +1 -1
- data/gsearch-parser.gemspec +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# GSearchParser
|
2
2
|
|
3
|
-
TODO: Write a gem description
|
4
3
|
GSearchParser is a lightweight framework for making Google search queries and parsing the resulting pages. More parsed results can be requested by simply calling the 'nextResults' method.
|
5
4
|
|
6
5
|
## Installation
|
@@ -19,34 +18,38 @@ Or install it yourself as:
|
|
19
18
|
|
20
19
|
## Usage
|
21
20
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
21
|
+
Create a new Google web search from a query string
|
22
|
+
|
23
|
+
require 'gsearch-parser'
|
24
|
+
|
25
|
+
webSearch = GSearchParser.webSearch('what')
|
26
|
+
|
27
|
+
Iterate over results
|
28
|
+
|
29
|
+
webSearch.each do |result|
|
30
|
+
puts "\t" + result.title
|
31
|
+
puts "\t" + result.content
|
32
|
+
puts "\t" + result.uri
|
33
|
+
puts "\n"
|
34
|
+
end
|
35
|
+
|
36
|
+
Fetch the next set of results, and iterate over them
|
37
|
+
|
38
|
+
webSearch.nextResults.each do |result|
|
39
|
+
puts "\t" + result.title
|
40
|
+
puts "\t" + result.content
|
41
|
+
puts "\t" + result.uri
|
42
|
+
puts "\n"
|
43
|
+
end
|
44
|
+
|
45
|
+
Iterate over all the results, including the ones from calls to .nextResults
|
46
|
+
|
47
|
+
webSearch.each do |result|
|
48
|
+
puts "\t" + result.title
|
49
|
+
puts "\t" + result.content
|
50
|
+
puts "\t" + result.uri
|
51
|
+
puts "\n"
|
52
|
+
end
|
50
53
|
|
51
54
|
## Contributing
|
52
55
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/gsearch-parser.gemspec
CHANGED