Skip to content

Commit 752d9cd

Browse files
committed
Changed bkg
1 parent 740737e commit 752d9cd

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ bmp.log
55
geckodriver.log
66
server.log
77
tmp/*
8+
downloaded/*
9+
output/*

resources/bkg.png

7.88 MB
Loading

tiktokbot.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,23 @@
66
import os
77
from TikTokApi import TikTokApi
88

9+
10+
# Creates new folders
911
if not os.path.isdir('output'):
1012
os.mkdir('output')
1113

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

1517

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

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

63+
64+
#
65+
# Start interface
66+
#
6167
print("Pick a video length (1-3)")
6268
print("1. 2-3 minutes")
6369
print("2. 5-7 minutes")

0 commit comments

Comments
 (0)