Created
August 26, 2012 17:13
-
-
Save mitchtech/3481728 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import feedparser | |
USERNAME = "username@gmail.com" | |
PASSWORD = "password" | |
response = feedparser.parse("https://" + USERNAME + ":" + PASSWORD + "@mail.google.com/gmail/feed/atom") | |
unread_count = int(response["feed"]["fullcount"]) | |
for i in range(0,unread_count): | |
print "(" + str((i+1)) + "/" + str(unread_count) + ") " + response['items'][i].title |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment