Page MenuHomeMiraheze

Create python script for usage of internetarchive uploads
Closed, ResolvedPublic

Assigned To
Unknown Object (User)
Authored By
Unknown Object (User)
Nov 23 2022, 16:37
Referenced Files
"Party Time" token, awarded by Agent_Isai.


Yesterday I had to do the upload manually with python console due to it being necessary to use session proxy which can be set that way.

import internetarchive
item = internetarchive.get_item('miraheze-wikibackups22112022')
# set session proxy
item.session.proxies = { 'http': '', 'https': '' }
# metadata
md = {'title': 'miraheze-wikibackups22112022', 'mediatype': 'web', 'subject': 'miraheze;wikiteam', 'date': '2022-11-22'}
# upload
item.upload('/home/reception/wikibackups22112022_NODB141_.tar.gz', metadata=md)

Is exactly what I used for uploading, that we can turn into a script.

Event Timeline

Unknown Object (User) triaged this task as Normal priority.Nov 23 2022, 16:37
Unknown Object (User) created this task.
Unknown Object (User) closed this task as Resolved.Nov 26 2022, 19:02

This is now done.

Unknown Object (User) moved this task from Backlog to Short Term on the MediaWiki (SRE) board.Nov 26 2022, 19:02
Unknown Object (User) edited projects, added Puppet; removed MediaWiki.
Unknown Object (User) moved this task from Unsorted to Short Term on the Universal Omega board.