>>297 どぞ。

# -*- coding: Shift_JIS -*-

import urllib, smtplib
from email.MIMEText import MIMEText
from email.Charset import Charset

def main():
    # 掲示板の URL
    bbs = "http://pc11.2ch.net/test/read.cgi/tech/1153585095/l50";
    # 通知メールの宛て先
    mail = "****@****.****.ne.jp"
    # SMTP サーバのホスト名
    smtp = "mail.****.****.ne.jp"
    if updated(bbs):
        print "updated"
        notify(mail, smtp, bbs)
    else:
        print "not updated"

def updated(URL):
    CACHE_FILE = "updatechecker.dat"
    # キャッシュファイルに保存したページ内容を取り出す
    try:
        file = open(CACHE_FILE, "rb")
        cached_contents = file.read()
        file.close()
    except IOError:
        cached_contents = None