Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Remove [citation needed] and added <br> for multiple ports #6

Merged
merged 1 commit into from Nov 1, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion port_lookup/parse.py
Expand Up @@ -62,6 +62,8 @@ def get_protocol_string(tcp, udp):

# Remove citenote text
description = re.sub("\[\d*\]", "", cells[3].text_content());
# And [citation needed] text too
description = re.sub("\[citation needed\]", "", cells[3].text_content());

status = cells[4].text_content();

Expand All @@ -78,7 +80,7 @@ def get_protocol_string(tcp, udp):


for port, descriptions in ports_list.iteritems():
description = unicode("\\n".join(descriptions)).encode("utf-8");
description = unicode("<br />".join(descriptions)).encode("utf-8");
f.write("\t".join([str(port), # title
"", # namespace
url, # url
Expand Down