From 2e53dbd5f8f2d402dfb418fc509ad35990134f25 Mon Sep 17 00:00:00 2001 From: cmdln Date: Fri, 31 Dec 2010 12:27:31 -0500 Subject: [PATCH] Tweaked archive slug algo. --- append.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/append.py b/append.py index f14cacd..c279cbd 100755 --- a/append.py +++ b/append.py @@ -131,7 +131,7 @@ def __append_itunes(config, entry, output, suffix, base_url): summary = '\n\n'.join([''.join(p.findAll(text=True)) for p in soup.findAll('p')]) (url, mime_type, size) = __enclosure(config, entry.enclosures, base_url, suffix) if size == 0: - raise Exception('Couldn not find media, %s.' % base_url) + raise Exception('Couldn not find media, %s.' % (url)) output.write(""" %(title)s%(title_suffix)s %(link)s @@ -222,7 +222,7 @@ def __archive_slug(title): on their description and empirical data from dozens of uploads. """ slug = re.sub('\([^0-9]\)-\([^0-9]\)', '\1\2', title) - slug = re.sub('[^A-Za-z0-9\-]', ' ', slug) + slug = re.sub('[^A-Za-z0-9\-\.]', ' ', slug) slug = re.sub(' {2,}', ' ', slug) tokens = slug.split(' ') tokens = [t.capitalize() for t in tokens]