From 13903046d4d5977dbdaea3ca21a8c5d2cbb8c3b3 Mon Sep 17 00:00:00 2001 From: Sandro Winkler Date: Fri, 25 Jan 2019 15:43:28 +0100 Subject: [PATCH] Update pymisp tutorial Extract the "response" field from the json result returned by misp.search_index --- docs/tutorial/PyMISP_tutorial.ipynb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/tutorial/PyMISP_tutorial.ipynb b/docs/tutorial/PyMISP_tutorial.ipynb index 7eab177..c12a217 100644 --- a/docs/tutorial/PyMISP_tutorial.ipynb +++ b/docs/tutorial/PyMISP_tutorial.ipynb @@ -315,9 +315,11 @@ "metadata": {}, "outputs": [], "source": [ - "results = misp.search_index(eventinfo='notebook')\n", + "result = misp.search_index(eventinfo='notebook')\n", + "events = result['response']\n", "\n", - "for event in results:\n", + "print('Found ', len(events), ' events!')\n", + "for event in events:\n", " print(event['id'], ':', event['info'])" ] },