Skip to content

Instantly share code, notes, and snippets.

@Paaskehare
Paaskehare / gmail_unread.py
Created July 30, 2012 21:09
Python3 Script for counting unread emails from gmail, useful for conky
#!/usr/bin/env python
# encoding: utf-8
from urllib.request import FancyURLopener
username = 'username'
password = 'superlongandhardpassword'
url = 'https://%s:%s@mail.google.com/mail/feed/atom' % (username, password)