Avnsx / fansly-downloader

Easy to use fansly.com content downloading tool. Written in python, but ships as a standalone Executable App for Windows too. Enjoy your Fansly content offline anytime, anywhere in the highest possible content resolution! Fully customizable to download in bulk or single: photos, videos & audio from timeline, messages, collection & specific posts 👍
https://fansly.com/
GNU General Public License v3.0
1.28k stars 63 forks source link

Add argparser and cli options #145

Open ksonney opened 1 year ago

ksonney commented 1 year ago

This PR adds the following:

  1. Command line options for creator, download mode, a help screen, and update. This partially addresses https://github.com/Avnsx/fansly-downloader/issues/79
  2. A .gitignore file to ignore the any 'pycache' directories and
  3. Moves config.ini to config.ini.example to allow for a custom config.ini in the code directory.

This PR allows for command-line scripting usage similar to the following shell command:

for i in creator1 creator2; do python3 fansly_downloader.py -c $1 -d Collections -b; done

This then downloads the collections for creator1 and creator2 with no additional prompting

usage: fansly_downloader [-h] [-c CREATOR] [-u] [-d DOWNLOAD] [-b]

Download a creator's picures and videos from fansly. Confiuration is read from config.ini, and can be overridden by the
following options

options:
  -h, --help            show this help message and exit
  -c CREATOR, --creator CREATOR
                        The Name of the Creator to Download
  -u, --upgrade         Upgrade config file to the new version
  -d DOWNLOAD, --download DOWNLOAD
                        Download Mode. One of Normal, Timeline, Messages, Single (Single by post id) or Collections
  -b, --batch           Batch mode, do not prompt on Exit

Thanks for using fansly_downloader! :)
prof79 commented 1 year ago

Great stuff! But I have a major rewrite pending which does this and more. My version has multiple creator names support built-in, does not input() in non-interactive mode, properly raises exceptions and so on. But is a major codebase and philosophy change, though. Hope I can commit/PR in the next few days, difficult to test that all is like it was before.

prof79 commented 1 year ago

@ksonney you can take this for a ride if you want: https://github.com/prof79/fansly-downloader/tree/rewrite