Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.
jeff chen edited this page Feb 3, 2023 · 18 revisions

Command line arguments:

DOWNLOAD CONFIG - How files are downloaded

    -f --bulkfile <textfile.txt> : Bulk download from text file containing links
    
    -d --downloadpath <path> : REQUIRED - Set download path for single instance, must use '\' or '/'
    
    -c --chunksz <#> : Adjust download chunk size in bytes (Default is 64M)
    
    -t --threadct <#> : Change download thread count (default is 1, max is 3)
    
    -w --wait <#> : Delay between downloads in seconds (default is 0.25s)
    
    -b --track : Track artists which can updated later, not supported for discord.

EXCLUSION - Exclusion of specific downloads

    -x --excludefile "txt, zip, ..., png" : Exclude files with listed extensions, NO '.'s
    
    -p --excludepost "keyword1, keyword2,..." : Keyword in excluded posts, not case sensitive
    
    -l --excludelink "keyword1, keyword2,..." : Keyword in excluded link, not case sensitive. Is for link plaintext, not its target
    
    -o --omitcomment : Do not download any post comments
    
    -m --omitcontent : Do not download any textual post contents
    
    -n --minsize : Minimum file size in bytes

DOWNLOAD FILE STRUCTURE - How to organize downloads

    -s --partialunpack : If a artist post is text only, do not create a dedicated directory for it, partially unpacks files
    
    -u --unpacked : Enable unpacked file organization, all works will not have their own folder, overrides partial unpack
    
    -e --hashname : Download server name instead of program defined naming scheme, may lead to issues if Kemono does not store links correctly. Not supported for Discord
    
    -v --unzip : Enables unzipping of files automatically, requires 7z and setup to be done correctly

UTILITIES - Things that can be done besides downloading

    --UPDATE : Update all tracked artist works

TROUBLESHOOTING - Solutions to possible issues

    -z --httpcode "500, 502,..." : HTTP codes to retry downloads on, default is 429 and 403
    
    -r --maxretries <#> : Maximum number of HTTP code retries, default is infinite
    
    -h --help : Help
    
    --EXPERIMENTAL : Enable experimental mode
    
    --BENCHMARK : Benchmark experiemental mode's scraping speed, does not download anything

Bulk File Download

An example bulk file ("examples.txt") has been included.

A bulk file is a text file where each line is either a url in one of the supported url formats or a new line. The contents of the example file is included below:

https://kemono.party/patreon/user/572297/post/64470250

https://kemono.party/patreon/user/572297?o=50

Supported URL formats:

Downloads all artist works:

https://kemono.party/service/user/xxxxxx

Downloads all artist works on that specific page:

https://kemono.party/service/user/xxxxxx?o=25

Downloads specific artist work

https://kemono.party/service/user/xxxxxx/post/xxx

Important Discord Information

There are some discord posts which contain millions of posts, downloading Discord servers will take several days as well as needing a significant amount of memory.

Example Usage

Minimum switches:

python KMPDownloader.py -d "."

Downloads to the current directory. User is told to input a valid Kemono.party url.

Highly Customized Run:

python KMPDownloader.py --threadct 3 --track --unzip --unpacked --EXPERIMENTAL -z "429, 403, 502" -d "E:\User Files\gallery"

Use 3 threads, add downloaded archives to updater database, unzip files automatically, download files in unpacked file structure, download using fetch-all then download approach, retry on http codes 429, 403, 502, download to "E:\User Files\gallery".

Bulk download

python KMPDownloader.py –d "." –f "./example.txt"

Bulk download url from example.txt to current directory

Clone this wiki locally