open-wa / wa-automate-python

💬 🤖 The most advanced Python whatsapp library for chatbots with advanced features. Be sure to ⭐ this repository for updates!
Other
330 stars 71 forks source link

Can't get profile pictures of users. #22

Closed WolfDWyc closed 3 years ago

WolfDWyc commented 4 years ago

Getting profile pictures of other people always returns None. The error seems to be in contact.py and wapi.js

        if 'profilePicThumbObj' in js_obj:
            self.profile_pic = js_obj["img"].get('eurl', None)

the obj is always {}, because of:

    profilePicThumbObj: obj.profilePicThumb ? WAPI._serializeProfilePicThumb(obj.profilePicThumb) : {},
mrodal commented 4 years ago

Hi, what do you mean other people?

WolfDWyc commented 4 years ago

Hi, what do you mean other people?

For example, these are all None, except my own picture.

                    partic_list = driver.get_chat_from_id(message.chat_id).get_participants()

                    for user in partic_list:
                        print(user.profile_pic)
mrodal commented 4 years ago

try the new version 1.2.0. You can upgrade running: pip install --upgrade openwa

WolfDWyc commented 4 years ago

try the new version 1.2.0. You can upgrade running: pip install --upgrade openwa

I just did, still got the same result.