When querying all records from 100 day depth, it breaks while parsing the data.
$ python
Python 3.10.6 (main, Aug 3 2022, 17:39:45) [GCC 12.1.1 20220730] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nvdlib
>>> import datetime
>>> end = datetime.datetime.now()
>>> start = end - datetime.timedelta(days=100)
>>> cves = nvdlib.searchCVE(pubStartDate=start, pubEndDate=end)
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/site-packages/nvdlib/cve.py", line 307, in searchCVE
raw = __get('cve', parameters, limit, key, verbose)
File "/usr/lib/python3.10/site-packages/nvdlib/get.py", line 65, in __get
getData = requests.get(link, params=parameters, timeout=30).json()['result']['CVE_Items']
File "/usr/lib/python3.10/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)