Skip to content

Auto-translated map_item updates from 4CAT: instagram#93

Draft
4cat-to-zeeschuimer-automation-pr[bot] wants to merge 1 commit into
masterfrom
auto/4cat-map-item-sync-instagram
Draft

Auto-translated map_item updates from 4CAT: instagram#93
4cat-to-zeeschuimer-automation-pr[bot] wants to merge 1 commit into
masterfrom
auto/4cat-map-item-sync-instagram

Conversation

@4cat-to-zeeschuimer-automation-pr

Copy link
Copy Markdown

🤖 This PR was auto-generated by the 4CAT map_item sync workflow. The JavaScript was produced by an LLM and requires human review before merging — including manual fixes for any lint warnings flagged below.

Generation parameters

  • Model: gpt-oss-120b (provider: litellm)
  • Total LLM time: 24.35s
  • Trigger: push of 98f281c to 4CAT master (module: instagram).

Summary

  • ✅ 1 translated
  • ❌ 0 failed
  • ❔ 0 skipped
Datasource Module Time Warnings
datasources/instagram/search_instagram.py modules/instagram.js 24.34s

datasources/instagram/search_instagram.py -> modules/instagram.js (24.34s)

LLM commentary:

The function mirrors the Python logic exactly: it checks for ads, determines the response type (Polaris, Graph, or legacy item list) and delegates to the corresponding parser functions already present in the module. All Python dict.get calls are replaced with optional chaining and nullish coalescing. Boolean checks, regex handling, and timestamp formatting use the global helpers (MissingMappedField, MappedItem, normalize_url_encoding, formatUtcTimestamp, extractHashtags). No additional imports or helper definitions are required beyond what's already defined elsewhere in the Zeeschuimer module.

Python diff
diff --git a/datasources/instagram/search_instagram.py b/datasources/instagram/search_instagram.py
index c2433f49..0f76b66f 100644
--- a/datasources/instagram/search_instagram.py
+++ b/datasources/instagram/search_instagram.py
@@ -241,7 +241,7 @@ class SearchInstagram(Search):
 
         no_likes = bool(node.get("like_and_view_counts_disabled"))
 
-        user = node.get("user")
+        user = node.get("user") or {}
         owner = node.get("owner")
         if node.get("user") and node.get("owner"):
             if owner.get("id") == user.get("id"):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant