2 281
Підписники
-824 години
+17 днів
+21130 днів
Архів дописів
',\n r''\n ):\n m=re.search(pattern,page,re.S|re.I)\n if m:\n try:\n raw=json.loads(html.unescape(m.group(1)))\n break\n except:\n pass\n\n if not isinstance(raw,dict):\n return {\"success\":False,\"error\":\"Unable to retrieve TikTok account data.\"},502\n\n info=raw.get(\"__DEFAULT_SCOPE__\",{}).get(\"webapp.user-detail\",{}).get(\"userInfo\",{})\n u=info.get(\"user\",{})\n st=info.get(\"stats\",{})\n st2=info.get(\"statsV2\",{})\n\n if not u:\n module=raw.get(\"UserModule\",{})\n u=module.get(\"users\",{}).get(username,{})\n st=module.get(\"stats\",{}).get(username,{})\n st2={}\n\n if not u:\n return {\"success\":False,\"error\":\"Account information not found.\"},404\n\n created=None\n if u.get(\"createTime\"):\n try:\n created=datetime.fromtimestamp(int(u[\"createTime\"]),timezone.utc).astimezone(timezone(timedelta(hours=7))).strftime(\"%H:%M:%S %d/%m/%Y\")\n except:\n created=None\n\n uid=u.get(\"uniqueId\") or username\n return {\n \"success\":True,\n \"user\":{\n \"id\":u.get(\"id\"),\n \"username\":uid,\n \"nickname\":u.get(\"nickname\"),\n \"bio\":u.get(\"signature\") or \"No bio\",\n \"avatar\":u.get(\"avatarLarger\") or u.get(\"avatarMedium\") or u.get(\"avatarThumb\"),\n \"private\":u.get(\"privateAccount\",False),\n \"created\":created,\n \"followers\":st.get(\"followerCount\",st2.get(\"followerCount\",0)),\n \"following\":st.get(\"followingCount\",st2.get(\"followingCount\",0)),\n \"likes\":st.get(\"heartCount\",st.get(\"heart\",st2.get(\"heartCount\",st2.get(\"heart\",0)))),\n \"videos\":st.get(\"videoCount\",st2.get(\"videoCount\",0)),\n \"url\":f\"https://www.tiktok.com/@{uid}\"\n }\n },200\n except Exception as e:\n return {\"success\":False,\"error\":str(e)[:300]},500\n\n def run(self):\n @self.app.route(\"/tiktok\",methods=[\"GET\"])\n def tiktok():\n data,status=self.Sc_amdtsmodz_inf(request.args.get(\"username\",\"\"))\n return jsonify(data),status\n\n self.app.run(host=\"0.0.0.0\",port=5000)\n\nif __name__==\"__main__\":\n amdtsmodz().run()","datePublished":"2026-11-07T13:31:45Z","dateModified":"2026-11-07T13:31:45Z","author":{"@type":"Organization","name":"sex","url":"https://telemetr.io/uk/channels/2808944924-amdtsmodzchannel","image":"https://img.telemetr.io/c/3462Ti/6282821179164792278?ty=x"},"publisher":{"@type":"Organization","name":"sex","url":"https://telemetr.io/uk/channels/2808944924-amdtsmodzchannel","image":"https://img.telemetr.io/c/3462Ti/6282821179164792278?ty=x"},"commentCount":0,"interactionStatistic":[{"@type":"InteractionCounter","interactionType":"https://schema.org/ViewAction","userInteractionCount":327},{"@type":"InteractionCounter","interactionType":"https://schema.org/ShareAction","userInteractionCount":6}]}},{"@type":"ListItem","position":19,"item":{"@type":"SocialMediaPosting","@id":"https://telemetr.io/uk/channels/2808944924-amdtsmodzchannel/posts/2772","url":"https://telemetr.io/uk/channels/2808944924-amdtsmodzchannel/posts/2772","mainEntityOfPage":"https://telemetr.io/uk/channels/2808944924-amdtsmodzchannel/posts/2772","headline":"Lâu lắm r k chs kbt g ra sao r🗿","articleBody":"Lâu lắm r k chs kbt g ra sao r🗿","datePublished":"2026-11-07T13:07:22Z","dateModified":"2026-11-07T13:07:22Z","author":{"@type":"Organization","name":"sex","url":"https://telemetr.io/uk/channels/2808944924-amdtsmodzchannel","image":"https://img.telemetr.io/c/3462Ti/6282821179164792278?ty=x"},"publisher":{"@type":"Organization","name":"sex","url":"https://telemetr.io/uk/channels/2808944924-amdtsmodzchannel","image":"https://img.telemetr.io/c/3462Ti/6282821179164792278?ty=x"},"commentCount":2,"interactionStatistic":[{"@type":"InteractionCounter","interactionType":"https://schema.org/ViewAction","userInteractionCount":284},{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2}]}},{"@type":"ListItem","position":20,"item":{"@type":"SocialMediaPosting","@id":"https://telemetr.io/uk/channels/2808944924-amdtsmodzchannel/posts/2771","url":"https://telemetr.io/uk/channels/2808944924-amdtsmodzchannel/posts/2771","mainEntityOfPage":"https://telemetr.io/uk/channels/2808944924-amdtsmodzchannel/posts/2771","headline":"Ae chơi bò lót phút k","articleBody":"Ae chơi bò lót phút k","datePublished":"2026-11-07T13:07:11Z","dateModified":"2026-11-07T13:07:11Z","author":{"@type":"Organization","name":"sex","url":"https://telemetr.io/uk/channels/2808944924-amdtsmodzchannel","image":"https://img.telemetr.io/c/3462Ti/6282821179164792278?ty=x"},"publisher":{"@type":"Organization","name":"sex","url":"https://telemetr.io/uk/channels/2808944924-amdtsmodzchannel","image":"https://img.telemetr.io/c/3462Ti/6282821179164792278?ty=x"},"commentCount":4,"interactionStatistic":[{"@type":"InteractionCounter","interactionType":"https://schema.org/ViewAction","userInteractionCount":288},{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4}]}}]}

2 280
Đợt này mình ho nhiều vl cổ ngứa vl có bài gì chữa kh, chứ ho lắm quá giờ nó đau cả phần bụng dưới tr mổ ruột thừa r
2 280
import re, json, html, aiohttp, asyncio
from flask import Flask, request, jsonify
from datetime import datetime, timezone, timedelta
class amdtsmodz:
def __init__(self):
self.app=Flask(__name__)
def Sc_amdtsmodz_inf(self,username):
username=username.strip().lstrip("@")
if not re.fullmatch(r"[A-Za-z0-9._]{1,24}",username):
return {"success":False,"error":"Invalid TikTok username."},400
try:
async def fetch():
async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=25)) as s:
async with s.get(f"https://www.tiktok.com/@{username}",headers={
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/131.0.0.0 Safari/537.36",
"Referer":"https://www.tiktok.com/"
}) as r:
if r.status!=200:
return None,r.status
return await r.text(),r.status
page,status=asyncio.run(fetch())
if status==404:
return {"success":False,"error":"TikTok account not found."},404
if status!=200:
return {"success":False,"error":f"TikTok returned HTTP {status}."},status
raw=None
for pattern in (
r'<script[^>]*id=["\']__UNIVERSAL_DATA_FOR_REHYDRATION__["\'][^>]*>(.*?)</script>',
r'<script[^>]*id=["\']SIGI_STATE["\'][^>]*>(.*?)</script>'
):
m=re.search(pattern,page,re.S|re.I)
if m:
try:
raw=json.loads(html.unescape(m.group(1)))
break
except:
pass
if not isinstance(raw,dict):
return {"success":False,"error":"Unable to retrieve TikTok account data."},502
info=raw.get("__DEFAULT_SCOPE__",{}).get("webapp.user-detail",{}).get("userInfo",{})
u=info.get("user",{})
st=info.get("stats",{})
st2=info.get("statsV2",{})
if not u:
module=raw.get("UserModule",{})
u=module.get("users",{}).get(username,{})
st=module.get("stats",{}).get(username,{})
st2={}
if not u:
return {"success":False,"error":"Account information not found."},404
created=None
if u.get("createTime"):
try:
created=datetime.fromtimestamp(int(u["createTime"]),timezone.utc).astimezone(timezone(timedelta(hours=7))).strftime("%H:%M:%S %d/%m/%Y")
except:
created=None
uid=u.get("uniqueId") or username
return {
"success":True,
"user":{
"id":u.get("id"),
"username":uid,
"nickname":u.get("nickname"),
"bio":u.get("signature") or "No bio",
"avatar":u.get("avatarLarger") or u.get("avatarMedium") or u.get("avatarThumb"),
"private":u.get("privateAccount",False),
"created":created,
"followers":st.get("followerCount",st2.get("followerCount",0)),
"following":st.get("followingCount",st2.get("followingCount",0)),
"likes":st.get("heartCount",st.get("heart",st2.get("heartCount",st2.get("heart",0)))),
"videos":st.get("videoCount",st2.get("videoCount",0)),
"url":f"https://www.tiktok.com/@{uid}"
}
},200
except Exception as e:
return {"success":False,"error":str(e)[:300]},500
def run(self):
@self.app.route("/tiktok",methods=["GET"])
def tiktok():
data,status=self.Sc_amdtsmodz_inf(request.args.get("username",""))
return jsonify(data),status
self.app.run(host="0.0.0.0",port=5000)
if __name__=="__main__":
amdtsmodz().run()