import requests
from bs4 import BeautifulSoup


def get_html_rows(url):
    """This method returns HTML code for a given URL as a list. Each value in the list
    corresponds to each line of the HTML code.

    Arguments
    ---------
    1. url {String} -- The URL for the desired HTML code.
    
    Raises
    ------
    None
    
    Returns
    -------
    List -- The HTML code for the given URL, split by lines.
    """

    # Getting a requests response from the given URL.
    resp = requests.get(url, verify=False)
    # Parsing the request response:
    soup = BeautifulSoup(resp.content, 'html5lib')
    # Formatting the parsed response:
    html = soup.prettify()
    # splitting the formatted HTML code into a list of lines:
    html_lines_list = html.splitlines()

    return html_lines_list