AddressBookImporter 0.0.11 → 0.0.12
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/lib/address_book_importer.rb +6 -5
- metadata +3 -3
@@ -4,7 +4,7 @@ require 'cgi'
|
|
4
4
|
require 'iconv'
|
5
5
|
|
6
6
|
module AddressBookImporter
|
7
|
-
VERSION = '0.0.
|
7
|
+
VERSION = '0.0.12'
|
8
8
|
|
9
9
|
class EmptyEmailException < Exception ; end
|
10
10
|
class LoginErrorException < Exception ; end
|
@@ -35,9 +35,10 @@ module AddressBookImporter
|
|
35
35
|
|
36
36
|
class Hotmail < Importer
|
37
37
|
|
38
|
-
attr_accessor :curr_page, :mode
|
38
|
+
attr_accessor :curr_page, :mode, :login_email
|
39
39
|
|
40
40
|
def login(login, password)
|
41
|
+
@login_email = login
|
41
42
|
page = @agent.get('http://login.live.com/login.srf?id=2')
|
42
43
|
form = page.forms.first
|
43
44
|
form.fields.find {|f| f.name == 'login'}.value = login
|
@@ -76,11 +77,11 @@ module AddressBookImporter
|
|
76
77
|
rval = get_email(p2.body)
|
77
78
|
else
|
78
79
|
p = @agent.click(link)
|
79
|
-
rval = get_email(p.body, /([_\-a-z0-9.A-Z]
|
80
|
-
rval.collect!{|a|a.gsub(
|
80
|
+
rval = get_email(p.body, /([_\-a-z0-9.A-Z]+(%|\\x)40((?:[-a-z0-9]+\.)+[a-z]{2,}))/)
|
81
|
+
rval.collect!{|a|a.gsub(/(%40|\\x40)/, '@')}
|
81
82
|
end
|
82
83
|
|
83
|
-
rval
|
84
|
+
rval.reject{|a|a == @login_email}
|
84
85
|
end
|
85
86
|
end
|
86
87
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: AddressBookImporter
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.0.12
|
7
|
+
date: 2007-09-27 00:00:00 +02:00
|
8
8
|
summary: Mechanize scraper for address books
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -67,5 +67,5 @@ dependencies:
|
|
67
67
|
requirements:
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 1.
|
70
|
+
version: 1.3.0
|
71
71
|
version:
|