I’m usually the scripting guy. But I know nothing about TikTok.
As far as I can see from the script in your post, it uses wget to try to retrieve the webpage, or file at the specified address.
So if the URL returns a page and not an error, like a 404 - it considers the site good, or up.
But if the site has good error handling, it could potentially return a page that displays an error message.
With regards to TikTok, I imagine that any valid TikTok URL will return a valid page.
But I don’t think you’ll be able to tell whether that user is actually live or not from that.
From a quick bit of DuckDuckGo-fu, I can see that TikTok (as with many other social media sites) does have a web-api that can be used by programmers.
However, I know nothing about their API.
It looks like you need to have a TikTok account with a certain number of videos posted AND you need to apply for an api key, then you can develop your own application to perform whatever functionality is exposed by their api.
So potentially, you MIGHT be able to apply for an api key and then create an application that will allow you to retrieve a list of accounts you follow and then list any that are live….. Emphasis there is on MIGHT - because I have no idea exactly what functionality is exposed in the TikTok api!
Hello! As you know I do NOT know anything about programming, and I got the code or bash script in Ubuntu to know if a page is online or not, I wanted to use it to know if a tiktok user is online or not from a list of users in a . TXT file, I have realized (within my naivety) that it may not be necessary to obtain an API, because when the User is in a LIVE streaming it appears in "LIVE" in the profile photo, and when "inspecting" the code changes, it is possible to do something with this in the script to make it work?
LIVE User: Notice "userSpaceOnUse"
<div class="tiktok-156wlhr-DivContainer e1vl87hj1" data-e2e="user-avatar" style="width: 116px; height: 116px;"><svg width="112" height="112" viewBox="0 0 112 112" fill="none" xmlns="
http://www.w3.org/2000/svg" class="tiktok-14q8znz-SvgRoundCircle e1vl87hj0"><circle cx="56" cy="56" r="55.25" stroke="url(#paint0_linear)" stroke-width="1.5"></circle><defs><linearGradient id="paint0_linear" x1="-48.977133333333335" y1="56" x2="63.022866666666665" y2="153.95450000000002" gradientUnits="userSpaceOnUse"><stop stop-color="#FF1764"></stop><stop offset="1" stop-color="#ED3495"></stop></linearGradient></defs></svg><span shape="circle" data-e2e="" class="e1vl87hj2 tiktok-runlml-SpanAvatarContainer-StyledAvatar e1e9er4e0" style="width: 110px; height: 110px;"><img loading="lazy" alt="" src="
https://p16-sign-va.tiktokcdn.com/t...&x-signature=37MlnZlAml3BcpM4P9dECizzuxc=" class="tiktok-1zpj2q-ImgAvatar e1e9er4e1"></span><span class="tiktok-1k4z0xn-SpanLiveBadge e1vl87hj3">LIVE</span></div>
Offline User: Not Streaming, Show This: --->
<img loading="lazy" alt="" src="
https://p16-sign-va.tiktokcdn.com/t...&x-signature=A1o3NGAhmxCbuL9sSGrWDr2vBBA=" class="tiktok-1zpj2q-ImgAvatar e1e9er4e1">
Sorry if i Bother you or anyone who read this, I'm so Naive in Programming, I appreciate your answer, Thank You!