How to use the internetarchive.Search function in internetarchive

To help you get started, we’ve selected a few internetarchive examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Famicoman / ia-collection-dl / ia-collection-dl.py View on Github external
def mk_mirror(target):
	'''Make the mirror'''
	target = 'collection:' + target
	print("Attempting to download collection: " + target)
	search = ia.Search(target)

	## Because the internetarchive module won't return us a list
	## we'll have to make our own.
	current_item = 1
	total_item = 0
	collection = []
	for entry in search:
		collection.append(entry)
		total_item += 1

	## Go through all items of the collection and download
	for entry in collection:
		item_id = entry['identifier']
		print('Downloading ' + str(current_item) + '/' + str(total_item) + '\t'\
			+ item_id)