correct a bug

pull/193/head
Sebdraven 2018-06-08 18:01:58 +02:00
parent 6eeca0fba1
commit f18f8fe05a
1 changed files with 2 additions and 2 deletions

View File

@ -55,13 +55,13 @@ def handle_expansion(api, ip, misperrors):
categories = list(set([item['@category'] for item in result['results']])) categories = list(set([item['@category'] for item in result['results']]))
result_filtered = [] result_filtered = {"results": []}
urls_pasties = [] urls_pasties = []
for r in result['results']: for r in result['results']:
if r['@category'] == 'pastries': if r['@category'] == 'pastries':
if r['@type'] == 'pastebin': if r['@type'] == 'pastebin':
urls_pasties.append('https://pastebin.com/raw/%s' % r['key']) urls_pasties.append('https://pastebin.com/raw/%s' % r['key'])
result_filtered.append({'type': ['url'], 'values': urls_pasties}) result_filtered['results'].append({'type': ['url'], 'values': urls_pasties})
return result_filtered return result_filtered