MCPcopy
hub / github.com/alirezamika/autoscraper / _get_soup

Method _get_soup

autoscraper/auto_scraper.py:114–122  ·  view source on GitHub ↗
(cls, url=None, html=None, request_args=None)

Source from the content-addressed store, hash-verified

112
113 @classmethod
114 def _get_soup(cls, url=None, html=None, request_args=None):
115 if html:
116 html = normalize(unescape(html))
117 return BeautifulSoup(html, "lxml")
118
119 html = cls._fetch_html(url, request_args)
120 html = normalize(unescape(html))
121
122 return BeautifulSoup(html, "lxml")
123
124 @staticmethod
125 def _get_valid_attrs(item):

Callers 3

buildMethod · 0.95
_get_result_by_funcMethod · 0.95
get_resultMethod · 0.95

Calls 2

normalizeFunction · 0.90
_fetch_htmlMethod · 0.80

Tested by

no test coverage detected