import requests
from bs4 import BeautifulSoup


def request_html_soup(cur_session, url: str) -> tuple:
    """Get html text and bs4 object of the html from URL.
    Args:
        cur_session: requests session object which should be used to make url call.
        url: The URL to be fetched.
    Returns:
        A tuple:
            resp_html: The response HTML page text version.
            resp_soup: BeautifulSoup object of the response HTML.
  """
    req = cur_session.get(url)
    if req.status_code == requests.codes.ok:
        resp_html = req.text
        resp_soup = BeautifulSoup(resp_html, features="html.parser")
    else:
        resp_html = None
        resp_soup = None
        print('Error: HTTP status code: ' + str(req.status_code))
    return resp_html, resp_soup