File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,8 @@ class CVEDB(object):
150150 FEED = "https://nvd.nist.gov/vuln/data-feeds"
151151 LOGGER = LOGGER .getChild ("CVEDB" )
152152 NVDCVE_FILENAME_TEMPLATE = "nvdcve-1.1-{}.json.gz"
153- META_REGEX = re .compile (r"https:\/\/.*\/json\/.*-[0-9]*\.[0-9]*-[0-9]*\.meta" )
153+ META_LINK = "https://nvd.nist.gov"
154+ META_REGEX = re .compile (r"\/feeds\/json\/.*-[0-9]*\.[0-9]*-[0-9]*\.meta" )
154155 RANGE_UNSET = ""
155156
156157 def __init__ (self , verify = True , feed = None , cachedir = None ):
@@ -169,11 +170,12 @@ def nist_scrape(self, feed):
169170 with contextlib .closing (request .urlopen (feed )) as response :
170171 page = response .read ().decode ()
171172 jsonmetalinks = self .META_REGEX .findall (page )
173+ full_links = [f"{ self .META_LINK } { path } " for path in jsonmetalinks ]
172174 pool = multiprocessing .Pool ()
173175 try :
174176 metadata = dict (
175177 pool .map (
176- functools .partial (log_traceback , getmeta ), tuple (jsonmetalinks )
178+ functools .partial (log_traceback , getmeta ), tuple (full_links )
177179 )
178180 )
179181 pool .close ()
You can’t perform that action at this time.
0 commit comments