Skip to content

Commit

Permalink
Changed bkg
Browse files Browse the repository at this point in the history
  • Loading branch information
davidteather committed Aug 25, 2020
1 parent 740737e commit 752d9cd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ bmp.log
geckodriver.log
server.log
tmp/*
downloaded/*
output/*
Binary file modified resources/bkg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion tiktokbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@
import os
from TikTokApi import TikTokApi


# Creates new folders
if not os.path.isdir('output'):
os.mkdir('output')

if not os.path.isdir('downloaded'):
os.mkdir('downloaded')


# Functions to use later
def getLength(pathtofile):
secsval = os.popen('''ffprobe -i ''' + pathtofile +
''' -show_entries format=duration -v quiet -of csv="p=0"''').read()
secsval.replace("\n", "")
secs = float(secsval)
return secs


def getSize(pathtofile):
size = os.popen(
"ffprobe -v error -select_streams v:0 -show_entries stream=width,height -v quiet -of csv=s=x:p=0 " + pathtofile).read()
Expand Down Expand Up @@ -58,6 +60,10 @@ def clearTMP(delpath):
clearTMP("downloaded/*")
clearTMP('output/output.mp4')


#
# Start interface
#
print("Pick a video length (1-3)")
print("1. 2-3 minutes")
print("2. 5-7 minutes")
Expand Down

0 comments on commit 752d9cd

Please sign in to comment.