def handle_starttag(self, tag, attrs):
        attrs = self.parseAttrs(attrs)

        for k in attrs:
            v = attrs[k]
            if k == 'id' and v == self.symbol:
                self.output = ''
            if k == 'class' and v == 'up':
                self.output = ''

        if tag in self.as_div:
            if 'class' in attrs:
                attrs['class'] += ' ' + tag
            else:
                attrs['class'] = tag
            tag = 'div'
        if tag in self.strip:
            return

        self.stack.append({'tag': tag, 'attrs': attrs})
        border = self.shall_border(tag, attrs)
        if border:
            self.output += '<div class="border border-' + border + '">'
        self.output += self.get_tag_text(tag, attrs)
dataset/ETHPy150Open acabin/docphp/docphp.py/PopupHTMLParser.handle_starttag/original