111 |
file = open(path) |
file = open(path) |
112 |
title = re.compile('<title>([^<]*)</title>') |
title = re.compile('<title>([^<]*)</title>') |
113 |
strip = re.compile('[a-zA-ZåäöÅÄÖ ]*') |
strip = re.compile('[a-zA-ZåäöÅÄÖ ]*') |
114 |
self.title = title.findall(file.read())[0] |
title = title.findall(file.read()) |
115 |
file.close() |
file.close() |
116 |
if len(self.title) == 0: self.title = path.split("/")[-1].split(".")[0] |
if len(title) > 0: self.title = strip.findall(title[0])[0] |
117 |
|
|
118 |
if not self.error and os.path.abspath(path) \ |
if not self.error and os.path.abspath(path) \ |
119 |
== os.path.abspath(slashify(config.working_directory)+config.output_filename): |
== os.path.abspath(slashify(config.working_directory)+config.output_filename): |