Added self as an argument to all previous methods that were static methods
This commit is contained in:
parent
3d53e8d6f1
commit
fcd91a9709
1 changed files with 3 additions and 3 deletions
|
|
@ -138,7 +138,7 @@ class BeautifulSoupCrawler:
|
||||||
await self.close()
|
await self.close()
|
||||||
|
|
||||||
@lru_cache(maxsize=1024)
|
@lru_cache(maxsize=1024)
|
||||||
def _domain_from_url(url: str) -> str:
|
def _domain_from_url(self, url: str) -> str:
|
||||||
"""Extract the domain (netloc) from a URL.
|
"""Extract the domain (netloc) from a URL.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
@ -153,7 +153,7 @@ class BeautifulSoupCrawler:
|
||||||
return url
|
return url
|
||||||
|
|
||||||
@lru_cache(maxsize=1024)
|
@lru_cache(maxsize=1024)
|
||||||
def _get_domain_root(url: str) -> str:
|
def _get_domain_root(self, url: str) -> str:
|
||||||
"""Get the root URL (scheme and netloc) from a URL.
|
"""Get the root URL (scheme and netloc) from a URL.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
@ -376,7 +376,7 @@ class BeautifulSoupCrawler:
|
||||||
)
|
)
|
||||||
await asyncio.sleep(backoff)
|
await asyncio.sleep(backoff)
|
||||||
|
|
||||||
def _normalize_rule(rule: Union[str, Dict[str, Any]]) -> ExtractionRule:
|
def _normalize_rule(self, rule: Union[str, Dict[str, Any]]) -> ExtractionRule:
|
||||||
"""Normalize an extraction rule to an ExtractionRule dataclass.
|
"""Normalize an extraction rule to an ExtractionRule dataclass.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue