summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xwnpp-query.py9
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]