Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import apache tomcat #292

Merged
merged 1 commit into from
Dec 17, 2020
Merged

Conversation

sbs2001
Copy link
Collaborator

@sbs2001 sbs2001 commented Dec 1, 2020

Addresses #106

Based on top of #278

Copy link
Collaborator

@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
Collaborator

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
Collaborator

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()

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
@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