Ejemplo n.º 1
0
def ff():
    print('关注者基本信息的格式为' + '\n' + '[序号, 个性域名, 昵称, 赞同数, 感谢数, 关注者人数]')
    for i in range(len(r2)):
        r3 = api.user(r2[i]).detail()
        r4 = [i, r3['urlToken'], r3['name'], r3['voteupCount'], r3['thankedCount'], r3['followerCount']]
        r5.append(r4)
        print(r4)
Ejemplo n.º 2
0
def ff():
    for i in range(len(r2)):
        r3 = api.user(r2[i]).detail()
        r4 = [
            i, r3['urlToken'], r3['name'], r3['voteupCount'],
            r3['thankedCount'], r3['followerCount']
        ]
        r5.append(r4)
        print(r4)
Ejemplo n.º 3
0
def followers(me, page):
    for i in range(page):
        data = api.user(me).followers(offset=(20 * i))
        for j in range(len(data)):
            r1.append(data[j]['name'])  # 关注者的昵称
            r2.append(data[j]['url_token'])  # 关注者的个性域名
Ejemplo n.º 4
0
def hash_id():
    for i in range(len(r2)):
        r3 = api.user(r2[i]).detail()
        r4 = [r3['id']]
        r5.append(r4)
    print(r5)
Ejemplo n.º 5
0
import zhihuapi as api

with open('cookie') as f:
    api.cookie(f.read())

u = api.user("aqdshg")

print(u.profile())