-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitchute-mass-uploader
executable file
·69 lines (62 loc) · 2.28 KB
/
bitchute-mass-uploader
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
readonly script="$0"
readonly app_path="$(dirname $script)"
readonly folder="$@"
readonly debug=false
source ${app_path}/config.ini
mkdir ${folder}/finished_transfer_movies &> /dev/null
netcon_failure() {
echo
echo " ** No Internet connection! -- Please check your Internet settings!"
echo " ** Retry Upload in 10 seconds!"
sleep 10
echo
echo " ** Retry connect to bitchute.com!"
}
echo "Bitchute Mass uploader started!"
echo
while true; do
for file in ${folder}/*.mkv ${folder}/*.mp4 ${folder}/*.mpeg ${folder}/*.mpg ${folder}/*.wmv ${folder}/*.mov;
do
if ! $(file "$file" | grep empty) &> /dev/null ; then
name_clear=$(basename "${file}")
name=$(echo "${name_clear}" | sed -E 's/(.mkv|.mp4|.mpeg|.mpg|.wmv|.mov)+//g')
if [ "$name" != "*" ]; then
echo "Check Internet connection!"
while true; do
curl https://bitchute.com &> /dev/null && break || netcon_failure
done
echo
echo " ** Internet works! Could connect to Bitchute.com!"
echo " ** Start Upload -"
echo
echo "Filename: $file"
echo "Upload Video Title: $name"
echo
file=$(printf '%q' "${file}")
task_cmd="python \"${app_path}/bitchute-uploader.py\" -f ${file} -n \"${name}\" -t \"${thumbnail}\" -e \"${email}\" -p \"${password}\" -v ${visibly_advice}; echo"
task_cmd_asterix="python \"${app_path}/bitchute-uploader.py\" -f '${file}\" -n \"${name}\" -t \"${thumbnail}\" -e \"${email}\" -p \"**********\" -v ${visibly_advice}"
if $debug; then
echo $task_cmd_asterix
fi
sem -j +0 "$task_cmd"
fi
fi
done
sem --wait
echo
echo " ** Restart Video content searching sequence!"
if [ $(find ${folder} -maxdepth 1 -type f -not -name 't_*' | grep -E "(.mkv|.mp4|.mpeg|.mpg|.wmv|.mov)" | wc -l) -eq 0 ] ; then
if ! $infinite_run_mode; then
echo " ** No Video content found! All done!"
break
else
echo " ** No Video content found! Recheck for content in 1 minute!"
sleep 60
fi
else
echo " ** Found $(find ${folder} -maxdepth 1 -type f -not -name 't_*' | grep -E "(.mkv|.mp4|.mpeg|.mpg|.wmv|.mov)" | wc -l) Videos!"
echo " ** Uploading Video files!"
fi
echo
done