Esempio n. 1
0
def get_friends(html):
    """
    :param html:
    :return: 返回关注数
    """
    cont = get_publicinfo.get_left(html)
    if cont == '':
        return 0
    soup = BeautifulSoup(cont, 'html.parser')
    try:
        return int(soup.find_all('strong')[0].get_text())
    except Exception:
        return 0
def get_status(html):
    cont = get_publicinfo.get_left(html)
    soup = BeautifulSoup(cont, 'html.parser')
    return int(soup.find_all('strong')[2].get_text())