

def _find_image_attrs(self, html):
    base_url = self.settings.images
    soup = bs4.BeautifulSoup(html, HTML_PARSER)
    pattern = re.compile('^.*\\{\\{(.*)\\}\\}.*$')
    attrs = set()
    for image in soup.find_all('img', attrs={
        'src': (lambda x: (x.startswith(base_url) and pattern.match(x))),
    }):
        src = image.get('src')
        attr = pattern.match(src).group(1).strip()
        attrs.add(attr)
    return attrs

dataset/ETHPy150Open KeepSafe/ks-email-parser/email_parser/gui/gui.py InlineFormRenderer._find_image_attrs/original