【发布时间】:2016-09-11 09:54:25
【问题描述】:
我尝试使用以下 URL 上传带有 pcloud (https://api.pcloud.com/uploadfile?) 的文件:
https://api.pcloud.com/uploadfile?username=myemail&password=mypassword&path=/&filename=myfile
但我收到以下错误:
{
"result": 0,
"metadata": [
],
"checksums": [
],
"fileids": [
]
}
这是我在 Windows 上的示例代码:
import requests
import json
username = 'test@gmail.com'
password = 'mypassword'
myfile = r'd:\MUSIC\Get Lucky\01 - Border Reiver.mp3'
url = "https://api.pcloud.com/uploadfile?username=%s&password=%s&path=/&filename=%s" % (username, password, myfile)
get = requests.get(url)
print json.loads(get.text)
【问题讨论】:
-
所以,我们实际上需要更多信息。您的代码示例可能非常有用。
-
我已经编辑了我的问题,任何想法,谢谢