@danhachuel/thunderbolt 0.4.65 → 0.4.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/app/main.py +10 -8
  2. package/package.json +1 -1
package/app/main.py CHANGED
@@ -2091,15 +2091,17 @@ def is_youtube_channel_record(channel: Any) -> bool:
2091
2091
  if not isinstance(channel, dict):
2092
2092
  return False
2093
2093
  platform = str(channel.get("platform") or "").strip().casefold().replace(" ", "")
2094
- if platform in {"tiktok", "tik-tok"}:
2094
+ if "tiktok" in platform or platform in {"tik-tok", "tt"}:
2095
+ return False
2096
+ def contains_tiktok_marker(value: Any) -> bool:
2097
+ if isinstance(value, dict):
2098
+ return any(contains_tiktok_marker(key) or contains_tiktok_marker(item) for key, item in value.items())
2099
+ if isinstance(value, (list, tuple, set)):
2100
+ return any(contains_tiktok_marker(item) for item in value)
2101
+ return "tiktok" in str(value or "").strip().casefold().replace(" ", "") or str(value or "").strip().casefold() == "tik-tok"
2102
+
2103
+ if contains_tiktok_marker(channel):
2095
2104
  return False
2096
- for field in ("url", "profile_url", "source_url", "import_source", "metrics_source", "provider", "network"):
2097
- value = str(channel.get(field) or "").strip().casefold()
2098
- if "tiktok.com" in value or value.startswith("tiktok") or value == "tik-tok":
2099
- return False
2100
- for field in ("tiktok_id", "tiktok_username", "tiktok_handle", "tiktok_user_id", "tiktok_open_id"):
2101
- if str(channel.get(field) or "").strip():
2102
- return False
2103
2105
  return True
2104
2106
 
2105
2107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.4.65",
3
+ "version": "0.4.66",
4
4
  "description": "Thunderbolt — interface local para operação de canais faceless e motor MoneyPrinterTurbo",
5
5
  "license": "MIT",
6
6
  "main": "scripts/cli.mjs",