yowsup icon indicating copy to clipboard operation
yowsup copied to clipboard

media message not download

Open manojrao opened this issue 9 years ago • 6 comments

Hello yowsup developers i received text message properly but media message not save in my panel proper. how to download media message in my system. please guide me.

manojrao avatar Aug 03 '17 10:08 manojrao

same issue plz update if any progress

vteccomm avatar Aug 13 '17 19:08 vteccomm

Media downloading is afaik currently broken in the normal yowsup due to media being encrypted by default. You can use my fork (basically just normal yowsup with the fix by @jbollacke which adds download and decryption of media).

Just call message.getMediaContent() and it will return the decrypted media as an byte-array.

jakibaki avatar Aug 13 '17 20:08 jakibaki

really appreciate your reply i m sorry i am newbie here r u suggesting me to del all previous work and start over again ? and i didn't understand where i will call this function message.getMediaContent() into yowsup-cli ? thanks

vteccomm avatar Aug 13 '17 22:08 vteccomm

I'm not at all suggesting you deleting everything and starting again, you can use my fork as a drop-in-replacement with whatever you made before.

yowsup-cli doesn't have this feature implemented right now, I assumed that you were going to write an bot using the normal api.

If you want that feature in yowsup-cli you can implement it yourself though.

Take a look at onMessage(self, message) in yowsup/demos/cli/layer.py, it's whats called whenever yowsup-cli gets an message. You can implement downloading the image wherever you want it there.

jakibaki avatar Aug 14 '17 03:08 jakibaki

@jakibaki it's amazing that you took the time to fix the media decryption. Is there a PR in place so the changes can be merged in the upstream repo?

marcosnils avatar Mar 23 '18 13:03 marcosnils

See media sink demo

tgalal avatar Jun 01 '19 21:06 tgalal