esearchy 0.2.0.2 → 0.2.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -13,6 +13,7 @@ Esearchy is a small library capable of searching the internet for email addresse
13
13
  * Google Profiles ( Based on DigiNinja's idea http://www.digininja.org/projects/gpscan.php)
14
14
  * Naymz
15
15
  * Classmantes
16
+ * Spoke
16
17
  * Other Engines
17
18
  * PGP servers
18
19
  * Usenets
data/bin/esearchy CHANGED
@@ -56,6 +56,7 @@ opts = GetoptLong.new(
56
56
  [ '--enable-gprofiles', GetoptLong::NO_ARGUMENT ],
57
57
  [ '--enable-naymz', GetoptLong::NO_ARGUMENT ],
58
58
  [ '--enable-ggroups', GetoptLong::NO_ARGUMENT ],
59
+ [ '--enable-spoke', GetoptLong::NO_ARGUMENT ],
59
60
  [ '--enable-pgp', GetoptLong::NO_ARGUMENT ],
60
61
  [ '--enable-usenet', GetoptLong::NO_ARGUMENT ],
61
62
  [ '--enable-spider', GetoptLong::NO_ARGUMENT ],
@@ -67,6 +68,7 @@ opts = GetoptLong.new(
67
68
  [ '--disable-gprofiles', GetoptLong::NO_ARGUMENT ],
68
69
  [ '--disable-naymz', GetoptLong::NO_ARGUMENT ],
69
70
  [ '--disable-ggroups', GetoptLong::NO_ARGUMENT ],
71
+ [ '--disable-spoke', GetoptLong::NO_ARGUMENT ],
70
72
  [ '--disable-pgp', GetoptLong::NO_ARGUMENT ],
71
73
  [ '--disable-usenet', GetoptLong::NO_ARGUMENT ],
72
74
  [ '--disable-spider', GetoptLong::NO_ARGUMENT ],
@@ -155,10 +157,10 @@ opts.each do |opt, arg|
155
157
  #END OF HELP
156
158
  exit(0)
157
159
  when '--enable-all' then
158
- @people_engines = [:LinkedIn, :Naymz, :Classmates, :GoogleProfiles]
160
+ @people_engines = [:LinkedIn, :Naymz, :Classmates, :GoogleProfiles, :Spoke]
159
161
  @email_engines = [:Google, :Bing, :Yahoo, :Altavista, :PGP, :Spider ,:Usenet, :GoogleGroups ]
160
162
  when '--enable-people' then
161
- @people_engines = [:LinkedIn, :Naymz, :Classmates, :GoogleProfiles]
163
+ @people_engines = [:LinkedIn, :Naymz, :Classmates, :GoogleProfiles, :Spoke]
162
164
  when '--enable-emails' then
163
165
  @email_engines = [:Google, :Bing, :Yahoo, :Altavista, :PGP, :Spider ,:Usenet, :GoogleGroups ]
164
166
  when '--enable-google' then
@@ -181,6 +183,8 @@ opts.each do |opt, arg|
181
183
  @email_engines << :Classmates
182
184
  when '--enable-ggroups' then
183
185
  @email_engines << :GoogleGroups
186
+ when '--enable-spoke' then
187
+ @people_engines << :Spoke
184
188
  when '--enable-pgp' then
185
189
  @email_engines << :PGP
186
190
  when '--enable-usenet' then
@@ -209,6 +213,8 @@ opts.each do |opt, arg|
209
213
  @email_engines.delete(:Classmates)
210
214
  when '--disable-ggroups' then
211
215
  @email_engines.delete(:GoogleGroups)
216
+ when '--disable-spoke' then
217
+ @people_engines.delete(:Spoke)
212
218
  when '--disable-pgp' then
213
219
  @email_engines.delete(:PGP)
214
220
  when '--disable-usenet' then
@@ -0,0 +1,35 @@
1
+ module ESearchy
2
+ module SocialEngines
3
+ class Spoke < ESearchy::GenericEngine
4
+ ENGINE = "www.google.com"
5
+ PORT = 80
6
+ NUM = 100
7
+ TYPE = 2
8
+
9
+ def search
10
+ @querypath = "/cse?q=site%3Awww.spoke.com+%22at+" +
11
+ CGI.escape(@company) + "%22&hl=en&cof=&num=100&filter=0&safe=off&start=" or
12
+ raise ESearchyMissingCompany, "Mssing website url Object.company=(value)"
13
+ super
14
+ end
15
+
16
+ def parse( html )
17
+ #Results <b>1</b> - <b>8</b> of <b>8</b> from <b>www.google.com</b>
18
+ hits = html.scan(/<\/b> of [\w\s]*<b>(.*)<\/b> from /)
19
+ if hits.empty? or hits == nil
20
+ @totalhits = 0
21
+ else
22
+ @totalhits = totalhits(hits[0][0].gsub(",","").to_i)
23
+ end
24
+ end
25
+
26
+ def crawl_people(text)
27
+ text.scan(/<a href="([0-9A-Za-z:\\\/?&=@+%.;"'()_-]+)" class=l[\sonmousedown="return clk(this.href,'','','res','\d','')"]*>([\w\s]*),/).each do |profile|
28
+ name,last = profile[1].split(" ")
29
+ @people << [name,last]
30
+ @results << [[name,last], "P", self.class.to_s.upcase, "N"]
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -38,7 +38,8 @@ module ESearchy
38
38
  :LinkedIn => ESearchy::SocialEngines::LinkedIn,
39
39
  :GoogleProfiles => ESearchy::SocialEngines::GoogleProfiles,
40
40
  :Naymz => ESearchy::SocialEngines::Naymz,
41
- :Classmates => ESearchy::SocialEngines::Classmates
41
+ :Classmates => ESearchy::SocialEngines::Classmates,
42
+ :Spoke => ESearchy::SocialEngines::Spoke
42
43
  }
43
44
 
44
45
  def initialize(args, &block)
@@ -54,6 +55,12 @@ module ESearchy
54
55
  block.call(self) if block_given?
55
56
  end
56
57
 
58
+ def start(&block)
59
+ block.call(self)
60
+ end
61
+
62
+ # Global Attributes
63
+
57
64
  def self.query
58
65
  @@query
59
66
  end
@@ -73,11 +80,7 @@ module ESearchy
73
80
  def maxhits
74
81
  @@maxhits
75
82
  end
76
-
77
- def start(&block)
78
- block.call(self)
79
- end
80
-
83
+
81
84
  def emails
82
85
  $emails
83
86
  end
@@ -2,3 +2,4 @@ require 'esearchy/socialengines/classmates'
2
2
  require 'esearchy/socialengines/googleprofiles'
3
3
  require 'esearchy/socialengines/linkedin'
4
4
  require 'esearchy/socialengines/naymz'
5
+ require 'esearchy/socialengines/spoke'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esearchy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.2
4
+ version: 0.2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias P. Brutti
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-16 00:00:00 -03:00
12
+ date: 2010-01-26 00:00:00 -03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -83,6 +83,7 @@ files:
83
83
  - lib/esearchy/SocialEngines/linkedin.rb
84
84
  - lib/esearchy/SocialEngines/linkedinfull.rb
85
85
  - lib/esearchy/SocialEngines/naymz.rb
86
+ - lib/esearchy/SocialEngines/spoke.rb
86
87
  - lib/esearchy/socialengines.rb
87
88
  - lib/esearchy/useragent.rb
88
89
  - lib/esearchy.rb