Skip to content

Instantly share code, notes, and snippets.

@mitchtech
Created August 26, 2012 17:13
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchtech/3481728 to your computer and use it in GitHub Desktop.
Save mitchtech/3481728 to your computer and use it in GitHub Desktop.
#!/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