This commit is contained in:
Stefan Ritter 2009-10-27 16:57:09 +01:00
parent b527c75549
commit 4f62f46fe9

View file

@ -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,9 +51,12 @@ 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:
days = line.split(' ')[0]
if re.match('^in preparation since yesterday', line):
days = '1'
else:
days = line.split(' ')[0]
else:
days = line.split(' ')[1]
item.append(days)