Skip to main content

OnlySnarf

Shnarf

Please refer to the Menu for help with the available arguments and config settings.

Description

OnlySnarf is a python based automation tool to assist with uploading content to OnlyFans by interacting with the site purely via web scraping. OnlySnarf carries no weapons, but it has been known to use its tail, teeth and claws when improperly configured.

Here are some fuzzy debugging previews of how it looks when everything works:

Installation

There are two installation options:

  1. via pip for the latest official package: python3 -m pip install onlysnarf
  2. or clone the repo & setup a virtual environment to install locally like in the bash script at bin/virtualenv.sh

Once installed run the command: snarf config

  1. Select 'reset' to reset / copy the main configuration file to its default location
  2. Add an OnlyFans user profile to login with via 'Add'

Here is an output of the command: snarf -h

Command example: snarf --username $username -text "suck my giant balls" /path/to/imageOfBalls.jpeg
Version: snarf -version or snarf --version

Config

Example config files are provided. There are two main types of config files that should be provided to affect runtime behavior as well as one optional method to help distinguish between user logins for multiple accounts.

  1. the config for the general app's behavior: $HOME/.onlysnarf/config.conf
  2. one config for each user containing their credentials: $HOME/.onlysnarf/users/$username.conf
  3. (optional) one config containing the default user credentials to use: $HOME/.onlysnarf/users/default.conf

The user config to use at runtime can be specificed with the "--username" argument. User config example: "--username alexdicksdown" --> $HOME/.onlysnarf/users/alexdicksdown.conf When no "--username" argument is passed at runtime or in the config file then the default config file containing the default user credentials is used.

The command snarf config is available for help adding, listing, updating, and removing user config files.

Note for Windows: the user's $HOME path works out to C:\Users\YOUR_USERNAME so the base directory for config files and such can instead be found at C:\Users\YOUR_USERNAME\.onlysnarf

No, the user credentials are not handled in the safest manner because they are very clearly stored in plain text with no encryption. Yes, a better way can be figured out. Do I think a better way is necessary for this project? No. So please be careful with your own credentials.

API

The api server is super basic and as such runs with the Flask development server behind the standard port 5000. Be sure to remember to open this port when attempting to make requests and don't spam your own server. The api fulfills a niche role built by request and allows OnlySnarf to passively wait to receive requests from the internet with the necessary data to post or message appropriately.

Make POST requests with the same basic discount, message, or post data to: /discount or /message or /post

Menu

The snarf menu command has been semi-restored and still requires further updates to return to the same pointless iteration of glory.

Dependencies

Selenium's webdriver manager should install everything it needs automatically. If left unspecified the default browser argument is "auto" which will cylce throuch each web driver available and attempt to spawn a working browser. If you are using a Raspberry Pi 4, be sure to run sudo apt-get install chromium-chromedriver on your device to be able to launch chrome. Firefox should work via the firefox-snap. The only working browsers for me have been chrome and firefox and so the others are unlikely to work without extra tinkering by yourself.

Platforms

Code versions:

  • Python: 3.10.12
  • selenium: 4.8.3
  • webdriver_manager: 4.0.0

Runs successfully on:

  • Linux Ubuntu : 86_64
  • Windows 11

Runs sucessfully with browsers:

  • Chrome
  • Firefox

Runs successfully on devices:

  • Raspberry Pi 4 : aarch64

Dev

If you are doing your own development or webscraping all of the related files are available at: OnlySnarf/lib/webdriver
And the shortcut file for webdriver behaviors that I'm not quire sure if I want to be a class or not but is used to funnel proper interactions through.
More in code commenting / documentation will come later.

Tests

The test environment uses the config file found at: OnlySnarf/conf/test-config.conf

Basic unittesting behavior organized by classes:

  • python -m unittest tests/classes/test_discount.py
  • python -m unittest tests/classes/test_post.py
  • python -m unittest tests/classes/test_message.py
  • python -m unittest tests/classes/test_users.py and by webdriver interactions:
  • python -m unittest tests/webdriver/test_discount.py
  • python -m unittest tests/webdriver/test_post.py
  • python -m unittest tests/webdriver/test_message.py
  • python -m unittest tests/webdriver/test_users.py

Pytests available under /tests:

  • pytest tests
  • pytest tests/classes
  • pytest tests/selenium
  • pytest tests/webdriver

Updates

7/5/2023 : clarifications to readme and menu text...
4/18/2023 : to further reduce repo size, preview gifs have been relocated to IPFS.
9/20/2023 : major cleanup of webdriver structure & overlap with classes; test scripts overhaul to match


Feel free to make use of my referral code ;)

Release files for OnlySnarf 4.7.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for OnlySnarf 4.7.2
File Size Uploaded
onlysnarf-4.7.2.tar.gz 91.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for OnlySnarf 4.7.2
File Interpreter ABI Platform
OnlySnarf-4.7.2-py3-none-any.whl Python 3 none any Details

Total release size: 192.0 kB

Release files / onlysnarf-4.7.2.tar.gz

Download URL onlysnarf-4.7.2.tar.gz
Size 91.6 kB
Tags Source
SHA-256 checksum
How to use checksums
51bb27b6145e24f2743e8d285941b1c523c7dfd520d5ed79234b7e8b430c4520
BLAKE2b-256 checksum
How to use checksums
7485138d466db91e8eea603d195c8401d3f2689f9520aeb4a161fa0fa83cd6ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / OnlySnarf-4.7.2-py3-none-any.whl

Download URL OnlySnarf-4.7.2-py3-none-any.whl
Size 100.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f64b66810fb52b920be4f4ff3d13f27defff0e909c3e7a5a6ab3f90285ffb11
BLAKE2b-256 checksum
How to use checksums
518b15834258853267924b749e4f604f7112747e3ee061b22fb396c1c1009b51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

4.7.2 This release

2 release files

4.7.1

2 release files

4.7.0

2 release files

4.6.1

2 release files

4.6.0

2 release files

4.5.9

2 release files

4.5.8

2 release files

4.5.7

2 release files

4.5.6

2 release files

4.5.5

2 release files

4.5.4

2 release files

4.5.3

2 release files

4.5.2

2 release files

4.5.1

2 release files

4.5.0

2 release files

4.4.13

2 release files

4.4.12

2 release files

4.4.11

2 release files

4.4.10

2 release files

4.4.1

2 release files

4.4.0

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.0

2 release files

2.20.1

2 release files

2.19.0

2 release files

2.18.0

2 release files

2.17.9

2 release files

2.17.8

2 release files

2.17.5

2 release files

2.16.7

1 release file

2.16.6

2 release files

2.16.5

2 release files

2.16.4

2 release files

2.16.3

2 release files

2.16.0

2 release files

2.15.5

2 release files

2.15.3

2 release files

2.15.1

2 release files

2.14.4

2 release files

2.14.2

2 release files

2.14.0

2 release files

2.13.2

2 release files

2.13.1

2 release files

2.13.0

2 release files

2.12.1

2 release files

2.11.4

2 release files

2.11.3

2 release files

2.11.2

2 release files

2.11.1

2 release files

2.11.0

2 release files

2.10.0

2 release files

2.9.6

2 release files

2.9.2

2 release files

2.9.1

2 release files

2.9.0

2 release files

2.8.0

2 release files

2.7.0

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

1 release file

1.2.0

1 release file

1.1.8

1 release file

1.1.6

2 release files

1.1.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page