import json
import re
from dojo.models import Finding

__author__ = "Roy Shoemake"
__status__ = "Development"


# Function to remove HTML tags
TAG_RE = re.compile(r'<[^>]+>')


def cleantags(text):
    return TAG_RE.sub('', text)


class NetsparkerParser(object):
    def __init__(self, filename, test):
        data = json.load(filename)
        dupes = dict()
        
        for item in data["Vulnerabilities"]:
            categories = ''
            language = ''
            mitigation = ''
            impact = ''
            references = ''
            findingdetail = ''
            title = ''
            group = ''
            status = ''
            
            title = item["Name"]
            findingdetail = cleantags(item["Description"])
            cwe = item["Classification"]["Cwe"]
            sev = item["Severity"]
            mitigation = cleantags(item["RemedialProcedure"])
            references = cleantags(item["RemedyReferences"])
            url = item["Url"]
            impact = cleantags(item["Impact"])
            dupe_key = title + item["Name"] + item["Url"]
             
            if dupe_key in dupes:
                find = dupes[dupe_key]
            else:
                dupes[dupe_key] = True

                find = Finding(title=title,
                               test=test,
                               active=False,
                               verified=False,
                               description=findingdetail,
                               severity=sev.title(),
                               numerical_severity=Finding.get_numerical_severity(sev),
                               mitigation=mitigation,
                               impact=impact,
                               references=references,
                               url=url,
                               cwe=cwe,
                               static_finding=True)
                dupes[dupe_key] = find
                findingdetail = ''

        self.items = dupes.values()

@@ -355,24 +355,16 @@
  dict()%0A
-        
 %0A       
@@ -636,28 +636,16 @@
 us = ''%0A
-            
 %0A       
@@ -1070,29 +1070,16 @@
 %5B%22Url%22%5D%0A
-             
 %0A       
@@ -1933,24 +1933,25 @@
 gdetail = ''
+ 
 %0A%0A        se

Update parser.py