ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/FreeBSDAdmin/Reminder/facebook.py
Revision: 1179
Committed: 2009-05-19T16:53:29-07:00 (16 years, 1 month ago) by douglas
Content type: text/x-python
File size: 480 byte(s)
Log Message:
Working somewhat again.

File Contents

# User Rev Content
1 douglas 1179 # Facebook
2     #
3     # Douglas Thrift
4     #
5     # $Id$
6    
7     import icalendar
8     import urllib, urllib2
9     import warnings
10    
11     def main(calendar, config, debug):
12     with warnings.catch_warnings():
13     warnings.filterwarnings('ignore', r'object\.__init__\(\) takes no parameters', DeprecationWarning)
14    
15     for event in icalendar.Calendar.from_string(urllib2.urlopen('http://www.facebook.com/ical/u.php?' + urllib.urlencode({'uid': config.get('uid'), 'key': config.get('key')})).read()).walk('vevent'):
16     print event

Properties

Name Value
svn:keywords Id