#!/usr/local/bin/python import urllib, string, re, sys #get_moblog_v2.0 #2003/3/17 # 表示したい したくない URL のリスト # 最初に + - * を指定。+ ONLY - NOT * すべて ACL の最後は すべて表示しないが入っている。 # もし - のフィルターの場合は最後に、* * を記入してください。そうしないと表示が行われない。 # moblog_acl = "./moblog_acl.acl" #最大表示数 howmany = 7 url = "http://moblog.uva.ne.jp/" def movlog_string(str): start = str.find("", start) title_tag = str.find('', title_tag) + 1 lastIs = str.find("" return return_str #わすれるな、実行できなくなるぞ!! print 'Content-Type: text/html\n' print "" print "" print "" print "" print "" print "" print "" try: f = open(moblog_acl) acl_data = f.read() f.close() acl_list =[re.split(r"\s+", x) for x in acl_data.split("\n") if not x == ""] except: acl_list =[["*", "*"]] f = urllib.urlopen(url) data = f.read() moblogData = [tags for tags in data.split('