-
Notifications
You must be signed in to change notification settings - Fork 0
/
TuneMoji-Post-Check-Discontinued
34 lines (28 loc) · 1.38 KB
/
TuneMoji-Post-Check-Discontinued
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
#!/usr/bin/bash
#Made By GoalTV For TuneMoji Video Quality Check.
#Contact j.czeropski10@gmail.com January @2020
# Input for user of TuneMoji Url
read -p "Please Enter TuneMoji Link :" link
id=$( echo $link | rev | cut -d '/' -f 2 | rev )
#TuneMoji Api with jq
username=$(curl -s -X GET "https://apis.tune-moji.com/v1/clips/$id" -H "accept: application/json" | jq -r '.author | .username')
plays=$(curl -s -X GET "https://apis.tune-moji.com/v1/clips/$id" -H "accept: application/json" | jq -r '.stats | .plays')
comments=$(curl -s -X GET "https://apis.tune-moji.com/v1/clips/$id" -H "accept: application/json" | jq -r '.stats | .comments')
sends=$(curl -s -X GET "https://apis.tune-moji.com/v1/clips/$id" -H "accept: application/json" | jq -r '.stats | .sends')
likes=$(curl -s -X GET "https://apis.tune-moji.com/v1/clips/$id" -H "accept: application/json" | jq -r '.stats | .likes')
# variables Null
points=0
quality=0
playsq=0
commentsq=0
sendsq=0
likesq=0
#Quality Check up to 100 Points by if statments
# Plays
playsq=$(echo "scale=2; ($plays/200000)*20" | bc)
commentsq=$(echo "scale=2; ($comments/26)*25" | bc)
sendsq=$(echo "scale=2; ($sends/10)*25" | bc)
likesq=$(echo "scale=2; ($likes/1000)*30" | bc)
#Calculate total points
points=$(echo "scale=2; ($plays*0.1 + $comments*2 + $sends*3 + $quality + $likes*1 + $playsq + $commentsq + $sendsq + $likesq)" | bc)
echo "Total Points: $points"