diff options
author | Stefan Ritter <xeno@thehappy.de> | 2009-10-27 16:57:09 +0100 |
---|---|---|
committer | Stefan Ritter <xeno@thehappy.de> | 2009-10-27 16:57:09 +0100 |
commit | 4f62f46fe9cc9b74e0c2c7dfaf6355f5cd0815c0 (patch) | |
tree | af36e1fa5554926f5232a3f2fe26c2e3a1b82c94 | |
parent | b527c7554963282859602d9b9f0828ea3a50f4fd (diff) |
Bugfixes
-rwxr-xr-x | wnpp-query.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/wnpp-query.py b/wnpp-query.py index 7839fe3..fc0e0af 100755 --- a/wnpp-query.py +++ b/wnpp-query.py @@ -36,9 +36,9 @@ else: url = urllib2.urlopen('http://www.debian.org/devel/wnpp/requested') for line in url: - if re.findall('bugs\.debian\.org', line) or re.match('requested(.*)ago', line) or re.match('(.*)days in preparation', line): + if re.findall('bugs\.debian\.org', line) or re.match('requested(.*)ago', line) or re.match('^(.*)days in preparation\.$', line) or re.match('^in preparation since(.*)$', line): # First line - if re.match('^.ul.(.*),', line) or re.match ('^(.*)li.(.*),', line): + if re.match('^\<ul\>(.*),', line) or re.match ('^ \<li\>\<a href(.*)\</a\>,', line): # Link link = re.sub('<ul>', '', line).strip() # First line starts with <ul> link = line[14:43] @@ -51,8 +51,11 @@ for line in url: item.append(name) # Second line - if re.match('^requested(.*)', line) or re.match('^(.*)days in preparation', line): + if re.match('^requested(.*)$', line) or re.match('^(.*)days in preparation(.*)$', line) or re.match('^in preparation since yesterday(.*)$', line): if options.itp: + if re.match('^in preparation since yesterday', line): + days = '1' + else: days = line.split(' ')[0] else: days = line.split(' ')[1] |