telegraph

Python telegraph api. I can't understand how send image to telegraph via Python lib

China☆狼群 提交于 2021-02-11 14:12:24
问题 I'm trying to upload a photo from my hard drive to the telegraph. In the documentation it says to use the upload_file(): telegraph.upload.upload_file(f) Upload file to Telegra.ph’s servers. Returns a list of links. Allowed only .jpg, .jpeg, .png, .gif and .mp4 files. Parameters: f (file, str or list) – filename or file-like object. But I don't understand what "f (file, str or list) – filename or file-like object" means. That is, what do I need to do with the photo so that it can be passed to