From 0f9f52b1f6b5311aa3de4aabf000a812efdddf49 Mon Sep 17 00:00:00 2001 From: g1879 Date: Mon, 4 Jan 2021 17:23:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0comments=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 17 +++++++++-------- README.zh-cn.md | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.en.md b/README.en.md index 83d9e4d..88c52ae 100644 --- a/README.en.md +++ b/README.en.md @@ -697,6 +697,7 @@ element.html # Return element outerHTML element.inner_html # Return element innerHTML element.tag # Return element tag name element.text # Return element innerText value +element.comments # Returns the list of comments within the element element.link # Returns absolute href or src value of the element. element.texts() # Returns the text of all direct child nodes in the element, including elements and text nodes, you can specify to return only text nodes element.attrs # Return a dictionary of all attributes of the element @@ -1905,15 +1906,17 @@ Return all attributes and values ​​of the element in a dictionary. Returns: dict - - ### text Returns the text inside the element. Returns: str +### comments +Returns the list of comments within the element + +Returns: list ### link @@ -1921,8 +1924,6 @@ Returns absolute href or src value of the element. Returns: str - - ### css_path Returns the absolute path of the element css selector. @@ -2377,15 +2378,17 @@ Returns the names and values of all attributes of the element in dictionary form Returns: dict - - ### text Returns the text within the element, namely innerText. Returns: str +### comments +Returns the list of comments within the element + +Returns: list ### link @@ -2393,8 +2396,6 @@ Returns absolute href or src value of the element. Returns: str - - ### css_path Returns the absolute path of the element css selector. diff --git a/README.zh-cn.md b/README.zh-cn.md index 5959311..0d8af07 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -663,6 +663,7 @@ element.html # 返回元素 outerHTML element.inner_html # 返回元素 innerHTML element.tag # 返回元素 tag name element.text # 返回元素 innerText 值 +element.comments # 返回元素内注释列表 element.link # 返回元素 href 或 src 绝对 url element.texts() # 返回元素内所有直接子节点的文本,包括元素和文本节点,可指定只返回文本节点 element.attrs # 返回元素所有属性的字典