python爬取微信

import itchat
itchat.logout()
itchat.login()
friends=itchat.get_friends(update=True)[0:]
result =  ('Signature', '个性签名')
for user in friends:
    with open('myFriends.csv', 'a', encoding='utf8') as f:
        if user.get(result[0]):
            f.write(result[1] + ":" + str(user.get(result[0])) + "\n")
print("完成")

#我这里只爬取了朋友的个性签名

爬取其它的,可以参考https://itchat.readthedocs.io/zh/latest/tutorial/tutorial0/

没有更多推荐了,返回首页