class HtmlDocument:
@classmethod
def from_str(cls, raw: str) -> HtmlDocument:
...
@property
def raw(self) -> str:
...
@property
def root(self) -> HtmlNode:
...
@property
def children(self) -> list[HtmlNode]:
...
def find_all(self, selector: str) -> list[HtmlNode]:
...
def find_all_xpath(self, xpath: str) -> list[HtmlNode | str | None]:
...
def find(self, selector: str) -> HtmlNode | None:
...
def find_xpath(self, xpath: str) -> HtmlNode | str | None:
...
def find_nth(self, selector: str, n: int) -> HtmlNode | None:
...
def find_nth_xpath(self, xpath: str, n: int) -> HtmlNode | str | None:
...
class HtmlNode:
@property
def text(self) -> str:
...
@property
def inner_text(self) -> str:
...
@property
def inner_html(self) -> str:
...
@property
def outer_html(self) -> str:
...
@property
def tag_name(self) -> str:
...
@property
def attributes(self) -> dict[str, str | None]:
...
@property
def children(self) -> list[HtmlNode]:
...
def find_all(self, selector: str) -> list[HtmlNode]:
...
def find_all_xpath(self, xpath: str) -> list[HtmlNode | str | None]:
...
def find(self, selector: str) -> HtmlNode | None:
...
def find_xpath(self, xpath: str) -> HtmlNode | str | None:
...
def find_nth(self, selector: str, n: int) -> HtmlNode | None:
...
def find_nth_xpath(self, xpath: str, n: int) -> HtmlNode | str | None:
...
def get_attribute(self, name: str) -> str | None:
...
def html_to_markdown(html: str, skip_tags: list[str] = ["script", "style"]) -> str:
...