diff --git a/cve-agency-manager/cve_tracking/src/cve/pipe.py b/cve-agency-manager/cve_tracking/src/cve/pipe.py index f36e45267181644e6b78b4ea78ce758dfa83658a..7990945c72e9b73a0279abfe3ed1ebf6ca3202d1 100644 --- a/cve-agency-manager/cve_tracking/src/cve/pipe.py +++ b/cve-agency-manager/cve_tracking/src/cve/pipe.py @@ -81,6 +81,7 @@ class FileHandle: download_failed = [] finds = [] find_path = {} + cve_dict=dict() for line in file.readlines(): if "cve information" in line.lower(): cve_info = line.replace("CVE Information : ", "") diff --git a/cve-agency-manager/cve_tracking/src/cve/plantform.py b/cve-agency-manager/cve_tracking/src/cve/plantform.py index 9767226729f8151594ba33ae560049b7a2c63adb..c2857cd33c839abef58810350a911bb7ede3ea35 100644 --- a/cve-agency-manager/cve_tracking/src/cve/plantform.py +++ b/cve-agency-manager/cve_tracking/src/cve/plantform.py @@ -287,7 +287,7 @@ class Nvd(Crawl): other_urls = set() pkg = Crawl._re_escape(pkg) - soup = BeautifulSoup(resp_str, "html.parser") + soup = BeautifulSoup(resp_str, "lxml") urls = [ res.text for res in soup.find_all( @@ -363,7 +363,8 @@ class Debian(Crawl): patch_urls = [] other_urls = [] - soup = BeautifulSoup(response.text, "html.parser") + soup = BeautifulSoup(response.text, "lxml") + pre = soup.pre if pre: @@ -550,9 +551,12 @@ class Bugzilla(Crawl): """ pulls = [] - for _, comment in comments["bugs"].items(): - for comment_info in comment["comments"]: - pulls.extend(re.findall(URL_REGEX, comment_info["text"])) + try: + for _, comment in comments["bugs"].items(): + for comment_info in comment["comments"]: + pulls.extend(re.findall(URL_REGEX, comment_info["text"])) + except (KeyError,Exception): + pass return pulls def parse_comments(self, response, **kwargs):