archiviare documenti su internet archive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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