From 04b2dba4a61af55a639d6be366679e4208c61231 Mon Sep 17 00:00:00 2001 From: Jeremy Carbaugh Date: Wed, 4 Apr 2012 17:58:54 -0400 Subject: [PATCH] add Activity Streams and OpenSocial --- pywebfinger.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pywebfinger.py b/pywebfinger.py index 3340921..72fa24d 100644 --- a/pywebfinger.py +++ b/pywebfinger.py @@ -2,9 +2,11 @@ from xrd import XRD import urllib, urllib2 RELS = { + 'activity_streams': 'http://activitystrea.ms/spec/1.0', 'avatar': 'http://webfinger.net/rel/avatar', 'hcard': 'http://microformats.org/profile/hcard', 'open_id': 'http://specs.openid.net/auth/2.0/provider', + 'opensocial': 'http://ns.opensocial.org/2008/opensocial/activitystreams', 'portable_contacts': 'http://portablecontacts.net/spec/1.0', 'profile': 'http://webfinger.net/rel/profile-page', 'xfn': 'http://gmpg.org/xfn/11', @@ -87,10 +89,13 @@ def finger(identifier, timeout=None): if __name__ == '__main__': import sys wf = finger(sys.argv[1]) - print "Avatar: ", wf.avatar - print "HCard: ", wf.hcard - print "OpenID: ", wf.open_id - print "Profile:", wf.profile - print "XFN: ", wf.find_link('http://gmpg.org/xfn/11', attr='href') + print "Activity Streams: ", wf.activity_streams + print "Avatar: ", wf.avatar + print "HCard: ", wf.hcard + print "OpenID: ", wf.open_id + print "Open Social: ", wf.opensocial + print "Profile: ", wf.profile + print "Portable Contacts: ", wf.portable_contacts + print "XFN: ", wf.find_link('http://gmpg.org/xfn/11', attr='href') if wf.insecure: print "Warning: Data was retrieved over an insecure connection"