def get_return_values(resp: str) -> Optional[str]:
"""
Attempts to extract the return values
from the response body. If this is longer
than around 250 characters, chances are
high that it's garbage, meaning that
no return values were found.
"""
start = resp.find(RETURN_VALUE_HEADER)
if start is None:
return None
start += len(RETURN_VALUE_HEADER)
end = resp.find(b"<h3>", start)
ret_vals = unescape(remove_tags(resp[start:end]))
return ret_vals if len(ret_vals) < 250 else None
评论列表
文章目录