Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contacts.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Gem::Specification.new do |s|
s.description = "A universal interface to grab contact list information from various providers including Yahoo, AOL, Gmail, Hotmail, and Plaxo."
s.has_rdoc = false
s.authors = ["Lucas Carlson"]
s.files = ["LICENSE", "Rakefile", "README", "examples/grab_contacts.rb", "lib/contacts.rb", "lib/contacts/base.rb", "lib/contacts/json_picker.rb", "lib/contacts/gmail.rb", "lib/contacts/aol.rb", "lib/contacts/hotmail.rb", "lib/contacts/plaxo.rb", "lib/contacts/yahoo.rb"]
s.files = ["LICENSE", "Rakefile", "README", "examples/grab_contacts.rb", "lib/contacts.rb", "lib/contacts/base.rb", "lib/contacts/json_picker.rb", "lib/contacts/gmail.rb", "lib/contacts/aol.rb", "lib/contacts/hotmail.rb", "lib/contacts/plaxo.rb", "lib/contacts/yahoo.rb", "lib/contacts/mailru.rb"]
s.add_dependency("json", ">= 1.1.1")
s.add_dependency('gdata', '>= 1.1.1')
end
6 changes: 3 additions & 3 deletions lib/contacts/aol.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ class Aol < Base
LOGIN_URL = "https://my.screenname.aol.com/_cqr/login/login.psp"
LOGIN_REFERER_URL = "http://webmail.aol.com/"
LOGIN_REFERER_PATH = "sitedomain=sns.webmail.aol.com&lang=en&locale=us&authLev=0&uitype=mini&loginId=&redirType=js&xchk=false"
AOL_NUM = "29970-343" # this seems to change each time they change the protocol
AOL_NUM = "32992-111" # this seems to change each time they change the protocol

CONTACT_LIST_URL = "http://webmail.aol.com/#{AOL_NUM}/aim-2/en-us/Lite/ContactList.aspx?folder=Inbox&showUserFolders=False"
CONTACT_LIST_CSV_URL = "http://webmail.aol.com/#{AOL_NUM}/aim-2/en-us/Lite/ABExport.aspx?command=all"
CONTACT_LIST_URL = "http://mail.aol.com/#{AOL_NUM}/aol-6/en-us/Lite/ContactList.aspx?folder=Inbox&showUserFolders=False"
CONTACT_LIST_CSV_URL = "http://mail.aol.com/#{AOL_NUM}/aol-6/en-us/Lite/ABExport.aspx?command=all"
PROTOCOL_ERROR = "AOL has changed its protocols, please upgrade this library first. If that does not work, dive into the code and submit a patch at http://github.com/cardmagic/contacts"

def real_connect
Expand Down
6 changes: 4 additions & 2 deletions lib/contacts/hotmail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def contacts(options = {})
# Grab info
case c_info[1]
when "e" # Email
build_contacts.last[1] = row.match(/#{email_match_text_beginning}(.*)#{email_match_text_end}/)[1]
build_contacts.last[1] = row.match(/#{email_match_text_beginning}(.*?)#{email_match_text_end}/)[1]
when "dn" # Name
build_contacts.last[0] = row.match(/<a[^>]*>(.+)<\/a>/)[1]
end
Expand All @@ -105,7 +105,9 @@ def contacts(options = {})
build_contacts.each do |contact|
unless contact[1].nil?
# Only return contacts with email addresses
contact[1] = CGI::unescape(contact[1])
while contact[1] =~ /((%[0-9a-fA-F]{2})+)/i do
contact[1] = CGI::unescape(contact[1])
end
@contacts << contact
end
end
Expand Down