我尝试使用以下 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)