I ask incase it makes the code harder to read by doing this for some reason. in my opinion it makes my classes look a lot cleaner
def __init__(self, html: str):
self.parser = BeautifulSoup(markup=html, features='lxml')
self.css = self.find_attr(query='href', attrs={'type': 'text/css'})
self.font = self.find_attr(
query='href', attrs={'type': re.compile('font/*')})
self.script = self.find_attr(
query='src', attrs={'type': 'text/javascript'})
self.anchor = self.find_attr(tag='a', query='href')
self.page_path = [self._has_path(tag) for tag in self.anchor]
self.page_fragment = [self._has_fragment(tag) for tag in self.anchor]