Instantly share code, notes, and snippets.

Embed
What would you like to do?
archiviare documenti su internet archive
from internetarchive import upload
import os
file="path/documento.pdf"
descr="descrizione documento"
head, tail = os.path.split(file)
md = dict(subject='tag1;tag2;tag3', description=descr)
r = upload(tail, files=file, metadata=md)
r[0].status_code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment