Skip to content

Instantly share code, notes, and snippets.

@iltempe
Last active April 30, 2018 19:57
Show Gist options
  • Save iltempe/f5d13db5867a5bee8573bb495c7dec76 to your computer and use it in GitHub Desktop.
Save iltempe/f5d13db5867a5bee8573bb495c7dec76 to your computer and use it in GitHub Desktop.
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