Permalink
Browse files

This is a paulh commit

  • Loading branch information...
1 parent 831020b commit a8910a6e8bf8fc274d028ce59e1548d30a3fac56 Perry Lorier committed Aug 27, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 tvrenamer2
View
@@ -1,6 +1,6 @@
#!/usr/bin/python
# coding=latin1
-# TV Renamer v2.22
+# TV Renamer v2.23
# (C) Copyright 2007-2011 Perry Lorier
#
# Latest version can be downloaded from
@@ -252,7 +252,7 @@ def fetchpage(title):
prefix=r"^(?:.*\.|<li>|[0-9]+)"
season=r"([0-9]+|S)-"
episode=r"([0-9]+)"
- marker = r".*(?:[0-9][0-9]|__|UNAIRED) +"
+ marker = r"[^<]*(?:[0-9][0-9]|__|UNAIRED) +"
rest = r"(.*)"
a=re.match(prefix+r' +'+season+r' *'+episode+marker+rest,i)
if a:
@@ -264,15 +264,15 @@ def fetchpage(title):
if not data.has_key(season):
data[season]={}
title=a.groups()[2]
+ debugmsg('Un cleaned title: %r', title)
if title.startswith("<a"):
b = re.match("<a[^>]*>([^<]+)</.*",title)
if b:
title=b.groups()[0]
else:
print "failed to clean",repr(title)
data[season][ep]=unhtmlspecialchars(title)
- if debug:
- debugmsg("Found: S%02dE%02d: %r",season,ep,data[season][ep])
+ debugmsg("Found: S%02dE%02d: %r",season,ep,data[season][ep])
else:
if debug and i!="":
#print "DEBUG: Unmatched line",`i`

0 comments on commit a8910a6

Please sign in to comment.