Image¶
- class mwclient.image.Image(site, name, info=None)[source]¶
- download(destination=None)[source]¶
Download the file. If destination is given, the file will be written directly to the stream. Otherwise the file content will be stored in memory and returned (with the risk of running out of memory for large files).
Recommended usage:
>>> with open(filename, 'wb') as fd: ... image.download(fd)
- Parameters:
destination (file object) – Destination file
- duplicatefiles(limit=None, max_items=None, api_chunk_size=None)[source]¶
List duplicates of the current file.
API doc: https://www.mediawiki.org/wiki/API:Duplicatefiles
limit sets a hard cap on the total number of results, it does not only specify the API chunk size.