Shosetsu/Parsing.py
async def parse_release_results(soup):
    """
    Parse Releases search pages.

    :param soup: The BS4 class object
    :return: A list of dictionaries containing a release dictionary. This is the same as the one returned in get_novel.
             It contains a Date released, Platform, Ages group and Name.
    """
    soup = list(soup.find_all('table', class_='stripe')[0].children)[1:]
    releases = []
    for item in soup:
        child = list(item.children)
        temp_rel = {'date': None, 'ages': None, 'platform': None, 'name': None}
        temp_rel['date'] = child[0].string
        temp_rel['ages'] = child[1].string
        temp_rel['platform'] = child[2].abbr.get('title')
        temp_rel['name'] = child[3].a.string
        releases.append(temp_rel)
        del temp_rel
    return releases
async def parse_release_results(soup):
    """
    Parse Releases search pages.

    :param soup: The BS4 class object
    :return: A list of dictionaries containing a release dictionary. This is the same as the one returned in get_novel.
             It contains a Date released, Platform, Ages group and Name.
    """
    soup = list(soup.find_all('table', class_='stripe')[0].children)[1:]
    releases = []
    for item in soup:
        child = list(item.children)
        temp_rel = {'date': None, 'ages': None, 'platform': None, 'name': None}
        temp_rel['date'] = child[0].string
        temp_rel['ages'] = child[1].string
        temp_rel['platform'] = child[2].abbr.get('title')
        temp_rel['name'] = child[3].a.string
        releases.append(temp_rel)
        del temp_rel
    return releases
Parse Releases search pages.

    :param soup: The BS4 class object
    :return: A list of dictionaries containing a release dictionary. This is the same as the one returned in get_novel.
             It contains a Date released, Platform, Ages group and Name.