Skip to content

Instantly share code, notes, and snippets.

@sehugg
Created June 16, 2019 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sehugg/0dc232c78e7e390b49a0bcea85728d04 to your computer and use it in GitHub Desktop.
Save sehugg/0dc232c78e7e390b49a0bcea85728d04 to your computer and use it in GitHub Desktop.
import json
import dateutil.parser
with open('nvdcve.json','r') as f:
root = json.load(f)
items = root['CVE_Items']
items = sorted(items, key=lambda k: dateutil.parser.parse(k.get('publishedDate', '')), reverse=True)
for item in items[0:6]:
print (item.get('publishedDate'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment