Documentation
¶
Overview ¶
Package tthtml pulls a named <script> JSON blob out of a TikTok web page. The page ships its state in <script id="..." type="application/json">...</script> tags; this package finds one by id and returns its raw JSON bytes.
Index ¶
Constants ¶
const UniversalDataID = "__UNIVERSAL_DATA_FOR_REHYDRATION__"
UniversalDataID is the id of the rehydration blob every modern TikTok page carries.
Variables ¶
var ErrNotFound = errors.New("script blob not found")
ErrNotFound means the page did not contain a script with the requested id.
Functions ¶
func IsWAFChallenge ¶
IsWAFChallenge reports whether a page body is the SlardarWAF "Please wait" challenge stub rather than real content. The stub is short and carries the challenge markers.
func ScriptJSON ¶
ScriptJSON returns the raw JSON text inside <script id="{id}" ...>...</script>. It scans the markup directly, which is cheaper and more forgiving than a full HTML parse for a single well known tag.
Types ¶
This section is empty.