GithubHelp home page GithubHelp logo

khenziii / khenz-tiktokbot Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 5.0 36.92 MB

๐Ÿค– Simple bot that generates and posts reddit stories

License: GNU General Public License v3.0

Python 52.47% JavaScript 33.90% Fluent 13.63%
autopost bot python tiktok video-generator

khenz-tiktokbot's Introduction

DISCLAIMER !!!

As of 04/07/2024, it's been over a year since I have written this code. Looking back at it, there's defienietely lots of room for improvement. Here are the most important things:

  1. This codebase surely should contain a Dockerfile that'd make using the app easier. Ideally, a GitHub workflow which'd automatically build a docker image and push it to Docker Hub.
  2. Using geckodriver was a mistake. Assuming, that tiktok provides valid documentation, using their's API seems far more reasonable.
  3. Both geckodriver_stuff/ and fonts/ shouldn't be version controlled.
  4. Further development will be almost impossible without tests. Under no circumstances should the developer have to run the whole app in order to check if certain behaviour is working. Lots of tests are needed here, they also might get integrated into CI/CD.
  5. The code should follow basic conventions. Such as:
  • DRY ("don't repeat yourself") principle. An example of this is the without_post.py file, which could be easily included in main.py (the posting behaviour should be controlled via a setting),
  • hardcoding secrets. Reddit's API credentials should be stored in a environment variable.
  • overwriting OS's environment variables. I have no idea why I did this, but overwriting $TMPDIR is for sure a mistake. This was fixed in a889ceb.

However, this doesn't mean that the app shouldn't be used at all! It's still functional. I probably won't ever bother to improve this old codebase, however if you'd like to contribute, I'm always going to happily review PRs!

khenz-tiktokbot

khenz-tiktokbot is a simple and easy to mod bot that automatically generates and posts videos to tiktok.

Installation

Here is a list of software that the script requires:

  1. FireFox
  2. geckodriver (you need to put it in geckodriver_stuff/)
  3. FFmpeg
  4. Python
  5. Python packages (they're frozen in requirements.txt)
  6. imagemagick
  7. A reddit's API app

Usage

After installing everything needed, you have to place a ~9 minutes long video in videos/video.webm; then run browsersetup.py, accept the cookies, log onto your tiktok account and finally close FireFox. After logging in, run browsertest.py, if you're logged in, then you shall be all setup :)

Now you can execute main.py to generate and post videos.

You can also edit a couple of things (such as the font color, font, fontsize, NSFW setting, etc..) in main.py :).

Contact

You can find the developer here: discord - "khenzii" :D

khenz-tiktokbot's People

Contributors

dependabot[bot] avatar khenziii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

khenz-tiktokbot's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.