From aab0dad8bba839f800c6a8e7e2859ae49a2c0b39 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Mon, 26 Feb 2018 07:26:57 -0500 Subject: [PATCH] #15 Signed-off-by: Kenneth Reitz --- README.rst | 16 +--------------- requests_html.py | 13 +------------ 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/README.rst b/README.rst index 12ecf6b..a2891a1 100644 --- a/README.rst +++ b/README.rst @@ -74,20 +74,6 @@ Select Elements within Elements: >>> about.find('a') [, , , , , ] -Render an Element as Markdown: - -.. code-block:: pycon - - >>> print(about.markdown) - - * [About](/about/) - - * [Applications](/about/apps/) - * [Quotes](/about/quotes/) - * [Getting Started](/about/gettingstarted/) - * [Help](/about/help/) - * [Python Brochure](http://brochure.getpython.info/) - Search for text on the page: .. code-block:: pycon @@ -120,4 +106,4 @@ Installation $ pipenv install requests-html ✨🍰✨ -Only Python 3 is supported. +Only Python 3 is supported. diff --git a/requests_html.py b/requests_html.py index 9fdfd2f..10e1e6c 100644 --- a/requests_html.py +++ b/requests_html.py @@ -8,8 +8,7 @@ from lxml.html.soupparser import fromstring from parse import search as parse_search from parse import findall -# HTML 2 Markdown converter. -html2text = html2text.HTML2Text() + useragent = UserAgent() @@ -49,11 +48,6 @@ class Element: """The full text content (including links) of the element.""" return self.pq.text_content() - @property - def markdown(self): - """Markdown representation of the element.""" - return html2text.handle(self.html) - @property def html(self): """HTML representation of the element.""" @@ -124,11 +118,6 @@ class HTML: """Searches the page (multiple times) for the given parse template.""" return [r for r in findall(template, self.html)] - @property - def markdown(self): - """Markdown representation of the page.""" - return html2text.handle(self.html) - @property def links(self): """All found links on page, in as–is form."""