How to download file/image on message #253
-
Please anyone guide about ,how to download file/image on message that send from another person.I try to catch message event :
My understand was IMAGE link .
but i can't authorize to save that file by python script. example code:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
As noted already in #252, you should be using with open('temp.png', 'wb') as image_file:
image_file.write(event.msg.fileContent) If that's not retrieving the content you expect, it would be useful to know what you are expecting instead. If a file offers multiple URLs and you need to fetch a different one, see the definition of Lines 602 to 603 in 00797b1 You should be able to pass in an alternate URL and have it authenticate in the same way. (See also: |
Beta Was this translation helpful? Give feedback.
As noted already in #252, you should be using
SkypeFileMsg.fileContent
:If that's not retrieving the content you expect, it would be useful to know what you are expecting instead.
If a file offers multiple URLs and you need to fetch a different one, see the definition of
fileContent
for how it authenticates:SkPy/skpy/msg.py
Lines 602 to 603 in 00797b1
You should be able to pass in an alternate URL and have it authenticate in the same way. (See also:
Auth.Authorize
)