Update htmlParser.py

This commit is contained in:
Somdev Sangwan
2018-11-10 22:55:04 +05:30
committed by GitHub
parent 67b6e36e88
commit b566e94361

View File

@@ -33,7 +33,7 @@ def htmlParser(response):
location = 'attribute'
break
if '<' not in response:
if rawResponse['Content-Type'] == 'text/html':
if rawResponse.headers['Content-Type'] == 'text/html':
location = 'html'
locations.append(location) # add location to locations list
num = 0 # dummy value to keep record of occurence being processed
@@ -80,4 +80,4 @@ def htmlParser(response):
value = '-->'
occurences[i]['position'] = position
occurences[i]['context'] = [loc, env, tag, attr]
return [occurences, positions]
return [occurences, positions]