TikTok
Follower count of a TikTok profile
| System | AWTRIX NG Scripts |
|---|---|
| Firmware | AWTRIX NG |
| Topic | Social |
| Built by | Blueforcer |
| File | qq5u6JebMuWg.ax · 3.0 KB |
| Icons | — |
| Published | 4 Aug 2026 |
| Downloads | 1 |
Follower count of any public TikTok profile. Enter the profile name, no login needed.
Updates every hour.
qq5u6JebMuWg.ax
# @name TikTok
# @desc Follower count of a TikTok profile
# @author Blueforcer
# @version 1.0
# @config user text "Profile name" default="blueforcer" maxlen=32
class TikTok
var url, user, period
var count, label, full, err
var ticks, busy
var glyph, pal, ramp
def init()
self.user = store.get("user")
self.url = "https://www.tikwm.com/api/user/info?unique_id=" + self.user
self.period = 3600 # once an hour
self.count = store.get("who") == self.user ? store.get("n") : nil
self.label = self.count == nil ? nil : self.human(self.count)
self.full = self.count == nil ? nil : str(self.count)
self.err = false
self.ticks = 15
self.busy = false
self.glyph = [0x0070, 0x006C, 0x006B, 0x0470,
0x1870, 0x1870, 0x1AB0, 0x06C0]
self.pal = [0x08CFF8, 0xFFFFFF, 0xFE2C55]
self.ramp = [0x08CFF8, 0xFE2C55]
end
def human(n)
if n < 1000 return str(n) end
var d = 1000
var suf = "K"
if n >= 1000000000
d = 1000000000
suf = "B"
elif n >= 1000000
d = 1000000
suf = "M"
end
var v = n / (d + 0.0)
if v >= 10 return str(round(v)) + suf end
var t = round(v * 10)
return str(int(t / 10)) + "." + str(t % 10) + suf
end
def on_body(body, status)
self.busy = false
shared.set("f", 0)
if status != 200 || body == nil
self.err = true
return
end
var m = re.search("(\\d+)", body)
if m == nil
self.err = true
return
end
var n = num(m[1])
if n == nil return end
self.err = false
if n == self.count return end
self.count = n
self.full = str(n)
self.label = self.human(n)
store.set("n", n)
store.set("who", self.user)
end
def tls_busy()
for k : shared.keys()
if size(k) > 2 && k[size(k) - 2 .. size(k) - 1] == ".f" && shared.get(k) == 1
var a = shared.age(k)
if a != nil && a < 20000 return true end
end
end
return false
end
def loop()
if self.ticks <= 0
if !self.busy && !self.tls_busy()
self.ticks = self.period
self.busy = true
shared.set("f", 1)
http.get(self.url, / b, st -> self.on_body(b, st),
{'find': "\"followerCount\":", 'keep': 32})
end
end
self.ticks -= 1
end
def draw()
clear()
for y : 0 .. 7
var row = self.glyph[y]
for x : 0 .. 7
var c = (row >> (14 - 2 * x)) & 3
if c > 0 pixel(x, y, self.pal[c - 1]) end
end
end
if self.label != nil
var avail = width() - 9
var s = self.full
var w = text_ink_width(s)
if w > avail
s = self.label
w = text_ink_width(s)
end
ramp_text(9 + (avail - w) / 2, 6, s, self.ramp)
return
end
var s = self.err ? "?" : "..."
var w = text_ink_width(s)
text(9 + (width() - 9 - w) / 2, 6, s, self.err ? 0xCC7722 : 0x555555)
end
end
return TikTok()
Install it on your AWTRIX NG
Your browser writes the script straight to the device on your network. It joins the app rotation right away.
Some browsers refuse to talk to a device on your network from a public page. Download the flow and paste it into the Scripts tab of your device, or install it from a terminal:
More flows for AWTRIX NG Scripts or Social
Something wrong with this flow? Report it.