def DownloadAttachments():
url_get_m = 'https://dev.azure.com/macs/Logr/_apis/wit/workitems/666?$expand=all&api-version=5.0'
r = requests.get(url_get_m, auth=(user_name_m, token_m))
res = r.json()
for item in res['relations']:
if item['rel'] == 'AttachedFile':
with open(item['attributes']['name'], "ab") as f:
f.write(requests.get(item['url']).content)
我并不为此感到骄傲:
相关问题 更多 >
编程相关推荐