def fetch_complete(self) -> TextIO:
"""Provide complete feed contents.
Returns:
Text stream of complete feed contents, that should be used
in with-statement to be closed afterwards.
Raises:
requests.HTTPError: When an HTTP error occurs when fetching feed.
"""
session = default_new_session(self.session)
resp = session.get(self.complete_url)
resp.raise_for_status()
with self._decode_contents(resp.content) as text:
yield text
评论列表
文章目录