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