Skip to content

Instantly share code, notes, and snippets.

import imaplib
import getpass
import re
import webbrowser
import sys
mail = imaplib.IMAP4_SSL('imap.gmail.com', 993)
pw = getpass.getpass() # get password
mail.login('example@gmail.com',pw)
import re, datetime
import twitter, PyRSS2Gen
def getURLs(text):
url=unicode(r"((http|ftp)://)?(((([\d]+\.)+){3}[\d]+(/[\w./]+)?)|([a-z]\w*((\.\w+)+){2,})([/][\w.~]*)*)")
return [a.group() for a in re.finditer(url,text)]
def mkFeedItem(url):
return PyRSS2Gen.RSSItem(