from bs4 import BeautifulSoup


class Parser(object):
    def __init__(self, html: str) -> None:
        self.html = html

    @property
    def soup(self):
        return BeautifulSoup(self.html, 'html.parser')

    @property
    def links(self):
        data = []
        ls = self.soup.find_all('a')
        for link in ls:
            data.append({
                'href': link['href'],
                'text': link.get_text()
            })
        return data

    @property
    def counts(self):
        return 0

    @property
    def report(self):
        return {
            'title': '',
            'person': '',
            'content': '',
        }

from bs4 import BeautifulSoup


class Parser(object):
    def __init__(self, html: str) -> None:
        self.html = html

    @property
    def soup(self):
        return BeautifulSoup(self.html, 'html.parser')

    @property
    def links(self):
        data = []
        ls = self.soup.find_all('a')
        for link in ls:
            data.append({
                'href': link['href'],
                'text': link.get_text()
            })
        return data

    @property
    def counts(self):
        return 0

    @property
    def report(self):
        return {
            'title': '',
            'person': '',
            'content': '',
        }
