if not messageIsRequest: response = messageInfo.getResponse() analyzedResponse = helpers.analyzeResponse(response) headerList = analyzedResponse.getHeaders() bodyStr = helpers.bytesToString(response[analyzedResponse.getBodyOffset():]).encode('ascii','ignore') if "| Professional Profile - LinkedIn" in bodyStr: strs = bodyStr.split("| Professional Profile - LinkedIn") strs.pop(-1) #remove the last item for str in strs: try: name = (str.rsplit("x3e",1)[1]).strip() except: x="test" try: name = (str.rsplit("\">",1)[1]).strip() if "=\"" in name: name = str.rsplit("=\"",1)[1] if "