MCPcopy Create free account
hub / github.com/CScorza/IntelOSINT / _extract_video_fields

Method _extract_video_fields

IntelOSINT.py:1162–1184  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

1160 return str(item.get("id") or item.get("aweme_id") or item.get("awemeId") or "").strip()
1161
1162 def _extract_video_fields(item):
1163 video_data = item.get("video", {})
1164 if not isinstance(video_data, dict):
1165 video_data = {}
1166 play_addr = (
1167 video_data.get("playAddr")
1168 or video_data.get("downloadAddr")
1169 or video_data.get("play_addr")
1170 or video_data.get("download_addr")
1171 )
1172 if isinstance(play_addr, dict):
1173 for key in ("urlList", "url_list"):
1174 url_list = play_addr.get(key) if isinstance(play_addr.get(key), list) else []
1175 if url_list:
1176 play_addr = url_list[0]
1177 break
1178 if isinstance(play_addr, list) and play_addr:
1179 play_addr = play_addr[0]
1180 if isinstance(play_addr, str):
1181 play_addr = play_addr.strip()
1182 if play_addr.startswith("//"):
1183 play_addr = "https:" + play_addr
1184 return video_data, play_addr
1185
1186 def _walk_tiktok_payload(node, sink):
1187 if isinstance(node, dict):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected