Skip to content

Conversation

@sbs2001
Copy link
Collaborator

@sbs2001 sbs2001 commented Dec 1, 2020

Addresses #106

Based on top of #278

@sbs2001 sbs2001 force-pushed the import_apache_tomcat branch from 6aebce9 to 0b7f2d8 Compare December 1, 2020 10:03
Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. See my tiny nits inline for your consideration

import re


import requests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sort your imports ;) ...the best way is to use the isort package for that

pageh3s = page_soup.find_all("h3")
vuln_headings = [i for i in pageh3s if "Fixed in Apache Tomcat" in i.text]
for data in vuln_headings:
fixed_version = data.text.split("Fixed in Apache Tomcat")[-1].strip()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be more robust:

_left, _sep, fixed_version = data.text.lower().partition("fixed in apache tomcat")
fixed_version = fixed_version.strip()

@sbs2001 sbs2001 force-pushed the import_apache_tomcat branch from 0b7f2d8 to af5e6e7 Compare December 17, 2020 05:55
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
@sbs2001 sbs2001 force-pushed the import_apache_tomcat branch from af5e6e7 to 2795792 Compare December 17, 2020 05:58
@sbs2001 sbs2001 merged commit 5e55167 into aboutcode-org:main Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants