summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Ritter <xeno@thehappy.de>2009-10-27 14:54:16 +0100
committerStefan Ritter <xeno@thehappy.de>2009-10-27 14:54:16 +0100
commit5731cd1f12df5e8e75f117201a5e76e3e664b036 (patch)
treeb5b937eec31fc93f514dca9d603efdfa32dc7e9c
parent1ba3c75714b02510a039d8d71d5384bb197e857f (diff)
Removed a needless regexp
-rwxr-xr-xrfpquery.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/rfpquery.py b/rfpquery.py
index 82ff0b6..0f3ef95 100755
--- a/rfpquery.py
+++ b/rfpquery.py
@@ -37,20 +37,20 @@ for line in rfpurl:
# First line
if re.match('^.ul.(.*),', line) or re.match ('^(.*)li.(.*),', line):
# Link
- link = re.sub('<ul>', '', line)
- link = re.sub('<li><a href="', '', link).strip()[:29]
+ link = re.sub('<ul>', '', line).strip() # First line starts with <ul>
+ link = re.sub('<li><a href="', '', link)[:29]
item.append(link)
# Name
- name = re.sub('<ul>', '', line).strip()
+ name = re.sub('<ul>', '', line).strip() # First line starts with <ul>
name = name[44:]
name = name.split(':', 1)[0]
item.append(name)
# Second line
if re.match('^requested(.*)', line):
- days = re.sub('requested ', '', line)
- days = re.sub(' days ago.', '', days).strip()
+ days = line[10:].strip() # Remove leading 'requests '
+ days = re.sub(' days ago.', '', days)
item.append(days)
if len(item) == 3: