# Buggy code
def _AtCoderProblemContent_parse_partial(
    soup: bs4.BeautifulSoup, problem: "AtCoderProblem"
) -> AtCoderProblemContentPartial:
    h2 = soup.find("span", class_="h2")

    alphabet, _, name = h2.text.partition(" - ")

    time_limit, memory_limit = h2.find_next_sibling("p").text.split(" / ")
    for time_limit_prefix in ("実行時間制限: ", "Time Limit: "):
        if time_limit.startswith(time_limit_prefix):
            break
    else:
        assert False
    time_limit_msec = int(
        float(
            utils.remove_suffix(
                utils.remove_prefix(time_limit, time_limit_prefix), " sec"
            )
        )
        * 1000
    )

    for memory_limit_prefix in ("メモリ制限: ", "Memory Limit: "):
        if memory_limit.startswith(memory_limit_prefix):
            break
    else:
        assert False
    memory_limit_byte = int(
        float(
            utils.remove_suffix(
                utils.remove_prefix(memory_limit, memory_limit_prefix), " MB"
            )
        )
        * 1000
        * 1000
    )

    return AtCoderProblemContentPartial(
        alphabet, memory_limit_byte, name, problem, time_limit_msec
    )


# Traceback (AssertionError)
$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import onlinejudge
onlinejudge.service.atcoder.AtCoderContest.from_url('https://atcoder.jp/contests/joi2019ho/tasks').list_problems()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/.local/lib/python3.6/site-packages/onlinejudge/service/atcoder.py", line 287, in list_problems
return [AtCoderProblem._from_table_row(tr) for tr in tbody.find_all('tr')]
File "/home/user/.local/lib/python3.6/site-packages/onlinejudge/service/atcoder.py", line 287, in <listcomp>
return [AtCoderProblem._from_table_row(tr) for tr in tbody.find_all('tr')]
File "/home/user/.local/lib/python3.6/site-packages/onlinejudge/service/atcoder.py", line 535, in _from_table_row
return _AtCoderProblemContentPartial_from_row(tr).problem
File "/home/user/.local/lib/python3.6/site-packages/onlinejudge/service/atcoder.py", line 364, in _AtCoderProblemContentPartial_from_row
time_limit_msec = int(float(utils.remove_suffix(tds[2].text, ' sec')) * 1000)
File "/home/user/.local/lib/python3.6/site-packages/onlinejudge/_implementation/utils.py", line 225, in remove_suffix
assert s.endswith(suffix)
AssertionError


# Fixed code
def _AtCoderProblemContent_parse_partial(
    soup: bs4.BeautifulSoup, problem: "AtCoderProblem"
) -> AtCoderProblemContentPartial:
    h2 = soup.find("span", class_="h2")

    alphabet, _, name = h2.text.partition(" - ")

    time_limit, memory_limit = h2.find_next_sibling("p").text.split(" / ")
    for time_limit_prefix in ("実行時間制限: ", "Time Limit: "):
        if time_limit.startswith(time_limit_prefix):
            break
    else:
        assert False
    if time_limit.endswith(" msec"):
        time_limit_msec = int(
            utils.remove_suffix(
                utils.remove_prefix(time_limit, time_limit_prefix), " msec"
            )
        )
    elif time_limit.endswith(" sec"):
        time_limit_msec = int(
            float(
                utils.remove_suffix(
                    utils.remove_prefix(time_limit, time_limit_prefix), " sec"
                )
            )
            * 1000
        )
    else:
        assert False

    for memory_limit_prefix in ("メモリ制限: ", "Memory Limit: "):
        if memory_limit.startswith(memory_limit_prefix):
            break
    else:
        assert False
    memory_limit_byte = int(
        float(
            utils.remove_suffix(
                utils.remove_prefix(memory_limit, memory_limit_prefix), " MB"
            )
        )
        * 1000
        * 1000
    )

    return AtCoderProblemContentPartial(
        alphabet, memory_limit_byte, name, problem, time_limit_msec
    )