    # Remove any trailing slash in the base URL.
    result["BASE_URL"] = result["BASE_URL"].rstrip("/")
    return result


def get_hrefs(data):
    """Traversing the data recursively, return the list of values
    for all 'href' keys in the dictionary.
    If the value for an 'href' key is not a string, then ignore it.
    """
    result = []
    if isinstance(data, list):
        for value in data:
            result.append(get_hrefs(value))