(self, data)
return results
Extract URLs/IPs from document items
        - Inspects the pages within the CHM
Extract URLs/IPs from document items
        - Inspects the pages within the CHM
Extract URLs / IPs from document items - Inspects the pages within the CHM
def find_urls(self, data):
        """
        Extract URLs/IPs from document items
        - Inspects the pages within the CHM
        """
        results = []
        url = re.compile(ur'''(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s
            ()<>\'\"]+|\(([^\s()<>]+|(\([^\s()<>\'\"]+\)))*\))+(?:\(([^\s()<>\'\"]+|(\([^\s\(\)<>
            \'\"]+\)))*\)|[^\s`!()\[\]{};:\'\"\.,<>?\xab\xbb\u201c\u201d\u2018\u2019]))''')
        ip = re.compile(ur'\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b')

        #Regex matches
        data = self.unescape(data)
        matches = re.findall(url,data)
        for match in matches:
            if not match in results:
                results.append(match[0])

        #String matches
        matches = re.findall(ip,data)
        for match in matches:
            if not match in results:
                results.append(match)
        return results
def find_urls ( self , data ) : results = [ ] url = re . compile ( ur'''(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s
            ()<>\'\"]+|\(([^\s()<>]+|(\([^\s()<>\'\"]+\)))*\))+(?:\(([^\s()<>\'\"]+|(\([^\s\(\)<>
            \'\"]+\)))*\)|[^\s`!()\[\]{};:\'\"\.,<>?\xab\xbb\u201c\u201d\u2018\u2019]))''' ) ip = re . compile ( ur'\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b' ) #Regex matches data = self . unescape ( data ) matches = re . findall ( url , data ) for match in matches : if not match in results : results . append ( match [ 0 ] ) #String matches matches = re . findall ( ip , data ) for match in matches : if not match in results : results . append ( match ) return results