Print more info on attachments.
This commit is contained in:
parent
fa7e2f5046
commit
b6f787167f
|
@ -258,10 +258,12 @@ def download_submission_attachments(course, course_view):
|
|||
for attachment in submission.attachments:
|
||||
filepath = os.path.join(attachment_dir, attachment.filename)
|
||||
if not os.path.exists(filepath):
|
||||
print('Downloading attachment: {}'.format(attachment.filename))
|
||||
print('Downloading attachment: {}'.format(filepath))
|
||||
r = requests.get(attachment.url, allow_redirects=True)
|
||||
with open(filepath, 'wb') as f:
|
||||
f.write(r.content)
|
||||
else:
|
||||
print('File already exists: {}'.format(filepath))
|
||||
|
||||
|
||||
def getCoursePageUrls(course):
|
||||
|
|
Loading…
Reference in New Issue