darkdragn / party

A quick *.party downloader
93 stars 13 forks source link

Python Party Downloader (kemono/coomer)

Just something I threw together for fun

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap

About The Project

Simply put, I got bored one night and threw this project together to pass the time.

(back to top)

Getting Started

I'm not sure if something like this would be welcome on pypi, so I'm just hosting it here on github for now. Quick install instructions

Prerequisites

Just have a modern version of python. ^3.9 should be fine. If you want support for 3.7 or 3.8 just open an issue. I just need to change some typing items and imports for those to work.

Installation

You can either clone the repo or install from Releases.

Installation from Releases

  1. Just do it, I guess. \shrugs (This is the latest link as of this post, check releases)
    pip install https://github.com/darkdragn/party/releases/download/v0.7.6/party-0.7.6-py3-none-any.whl

Installation from source

  1. Clone the repo
    git clone https://github.com/darkdragn/party.git
  2. CD into the source dir
    cd party
  3. Install
    pip install .

(back to top)

Usage

Party has 4 basic commands

party \

  kemono: Download from kemono
  coomer: Download from coomer
  update: Checks for and downloads new posts
  search: Find creators based on username or id

Download

Kemono and Coomer

A basic breakdown of the options

  Usage: party kemono [OPTIONS] SERVICE USER_ID
      Quick download command for kemono.party
    Arguments:
      SERVICE  Specify the service to pull from; Ex(patreon,fanbox,onlyfans)
               [required]
      USER_ID  User id from the url or name from search  [required]
    Options:
      --site TEXT                     [default: https://kemono.party]
      --files / --no-files            [default: files]
      --exclude-external / --no-exclude-external
                                      [default: exclude-external]
      -l, --limit INTEGER             Number of posts to parse. Starts from newest
                                      to oldest.
      --post-id / --no-post-id        Sets file_format to
                                      {ref.post_id}_{ref.filename}, mutually
                                      exclusive with post_title, ordered short and
                                      file_format
      -e, --exclude-extension TEXT    File extension to exclude
      -w, --workers INTEGER           Number of open download connections
                                      [default: 4]
      --name TEXT                     If you provided an id in the argument, you
                                      can provide a name here to skip user db
                                      pull/search.
      -d, --directory TEXT            Specify an output directory
      --post-title / --no-post-title  Sets file_format to
                                      {ref.post_title}_{ref.filename}, mutually
                                      exclusive with post_id, ordered_short and
                                      file_format  [default: no-post-title]
      --ordered-short / --no-ordered-short
                                      Sets file_format to {ref.post_id}_{ref.index
                                      :03}.{ref.extension}, mutually exclusive
                                      with post_id, post_title and file_format
                                      [default: no-ordered-short]
      --file-format TEXT              Used to set the output file format. Mutually
                                      exclusive with post_id, post_title and
                                      ordered short. For custom options, see
                                      post.py for schema fields. For example,
                                      {ref.post_id}_{ref.index:03}_{ref.filename}
                                      would accomplish combining post_id and
                                      ordering the files based on appearance in
                                      the post while keeping the original filename
                                      and extension  [default: {ref.filename}]
      --help                          Show this message and exit.

Examples

Party will check for existing files while downloading, so incomplete archives can be completed with kemono/coomer or with update.

Update

Search

Search supports all options kemono and coomer take, e.g. -e, -w, -d, -l