我使用的是firebase,它存储带有特殊字符的图像,比如sohttps://storage.googleapis.com/download/storage/v1/b/myapp.appspot.com/o/images%2F2021%2F5%2F600_jpgimage_5.jpg?generation=1620831628595831&alt=media
但是我想通过img = Image.open(requests.get(imageURL, stream=True).raw)
等将此图像传递给枕头来执行一些功能
但是当我记录正在传递的字符串时,它被转换为https://storage.googleapis.com/download/storage/v1/b/myapp.appspot.com/o/images/2021/5/600_jpgimage_5.jpg?generation=1620831628595831
我尝试过这样做rawStringURL = r'%s' %request_args["url"]
(这个URL在使用Flask的Google云函数中作为参数传递)
我如何保存这个URL,以便在枕头中对其执行操作时,它可以正常工作?我应该先把它下载到a/temp文件夹吗
我对Python非常陌生,大部分应用程序都是用JavaScript编写的
这就是我解决问题的方法——仍然需要测试,但目前正在努力
import urllib.parse
url = request_args["URL"] #request being received by the Google Cloud Function (Flask)
相关问题 更多 >
编程相关推荐