Package: vripper
vripperA Python implementation of VRipper. See the list of supported websites below.Installation# Python 3.6+pipinstallvripperUsagefromvripperimportdownload_threadifshould_disable_logging:logging.getLogger("vripper").setLevel(logging.CRITICAL)thread_url="https://..."dest=os.path.join(".","vripper")download_thread(thread_url,dest,**options)OptionsNot in any particular orderNameTypeDefault ValueDescriptionmodevripper.enum.downloadmode.DownloadModeFIRST_POST_ONLYDetermines which post(s) within the thread to download.output_formatvripper.enum.outputformat.OutputFormatNoneThe desired output format. Currently supported: zipdownload_threadpool_sizeint5The number of concurrent threads for the download. The minimum allowed value is 1.processing_pool_sizeint0The number of concurrent processes for the pre/post-processing. Set it to 0 to disable multiprocessing.max_filecountintNoneThe max number of files (images) allowed in a post. If the number of files exceeds the given value, the module skip a subset of images. Ex. Download every 3rd image.min_dimensionint(pixels)0The min dimension allowed for an image. Images whose dimensions are smaller than this value will be deleted.max_dimensionint(pixels)NoneThe max dimension allowed for an image. If the downloaded image exceeds the given value, the image will be resized.max_filesizeint(bytes)NoneAny files larger than this threshold will be deleted.min_filesizeint(bytes)NoneAny files smaller than this threshold will be deleted.acceptable_filesizeint(bytes)NoneAny files smaller than this threshold will not be considered for resize/compression. Expressed in bytes.min_hitratefloat.85A minimum percentage of files in a post required to be downloaded and processed successfully.download_connect_timeoutfloat(seconds)1.0The time it takes to abort the connection with the image host.download_read_timeoutfloat(seconds)10.0The time it takes to abort the read with the image host.compression_qualityint65JPEG compression quality -- more infohere. Set it to 0 to disable the compression. The value cannot be 0 ifmax_dimensionhas been specified.processing_priorityvripper.enum.processingpriority.ProcessingPriorityNoneDetermines the course of action, given two conflicting options. Example TBDExceptionsFor each image subject to download, there is a potential for the download to be considered unsuccessful. To name a few reasons:Temporary network issues;The host going offline temporarily or permanently;The image was deleted by the uploader;The downloaded file is corrupted; orThe downloaded file size is too small/big based on the user-specified threshold.In the end, if the total number of successfully downloaded images does not meetmin_hitrae, the module will throw one of the following exceptions:Note: If the post has more images than the value specified inmax_filecount, not all images will be subject to download. The skipped images will not be considered for themin_hitratecalculation.NameCalculation TimeDescriptionPermissionErrorPre-downloadRaised when the requested thread is private.UnsupportedHostErrorPre-downloadRaised when the number of images hosted by unsupported websites is too high.DeprecatedHostErrorPre-downloadRaised when the number of images hosted by deprecated websites is too high.ImagePermanentlyUnavailableErrorPost-downloadRaised when the number of deleted images is too high.InsufficientFileCountErrorFinalRaised when the number of resulting files in a post is too low.