Fixed formatting.
This commit is contained in:
@@ -222,6 +222,7 @@ class HtmlConverter(DocumentConverter):
|
|||||||
text_content=webpage_text,
|
text_content=webpage_text,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class RSSConverter(DocumentConverter):
|
class RSSConverter(DocumentConverter):
|
||||||
"""Convert RSS / Atom type to markdown"""
|
"""Convert RSS / Atom type to markdown"""
|
||||||
|
|
||||||
@@ -253,7 +254,9 @@ class RSSConverter(DocumentConverter):
|
|||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def _parse_atom_type(self, doc: minidom.Document) -> Union[None, DocumentConverterResult]:
|
def _parse_atom_type(
|
||||||
|
self, doc: minidom.Document
|
||||||
|
) -> Union[None, DocumentConverterResult]:
|
||||||
"""Parse the type of an Atom feed.
|
"""Parse the type of an Atom feed.
|
||||||
|
|
||||||
Returns None if the feed type is not recognized or something goes wrong.
|
Returns None if the feed type is not recognized or something goes wrong.
|
||||||
@@ -288,7 +291,9 @@ class RSSConverter(DocumentConverter):
|
|||||||
except BaseException as _:
|
except BaseException as _:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def _parse_rss_type(self, doc: minidom.Document) -> Union[None, DocumentConverterResult]:
|
def _parse_rss_type(
|
||||||
|
self, doc: minidom.Document
|
||||||
|
) -> Union[None, DocumentConverterResult]:
|
||||||
"""Parse the type of an RSS feed.
|
"""Parse the type of an RSS feed.
|
||||||
|
|
||||||
Returns None if the feed type is not recognized or something goes wrong.
|
Returns None if the feed type is not recognized or something goes wrong.
|
||||||
@@ -340,7 +345,9 @@ class RSSConverter(DocumentConverter):
|
|||||||
except BaseException as _:
|
except BaseException as _:
|
||||||
return content
|
return content
|
||||||
|
|
||||||
def _get_data_by_tag_name(self, element: minidom.Element, tag_name: str) -> Union[str, None]:
|
def _get_data_by_tag_name(
|
||||||
|
self, element: minidom.Element, tag_name: str
|
||||||
|
) -> Union[str, None]:
|
||||||
"""Get data from first child element with the given tag name.
|
"""Get data from first child element with the given tag name.
|
||||||
Returns None when no such element is found.
|
Returns None when no such element is found.
|
||||||
"""
|
"""
|
||||||
@@ -352,6 +359,7 @@ class RSSConverter(DocumentConverter):
|
|||||||
return fc.data
|
return fc.data
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
class WikipediaConverter(DocumentConverter):
|
class WikipediaConverter(DocumentConverter):
|
||||||
"""Handle Wikipedia pages separately, focusing only on the main document content."""
|
"""Handle Wikipedia pages separately, focusing only on the main document content."""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user