fmab777 commited on
Commit
e4d1389
·
verified ·
1 Parent(s): 71553bb

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -5
main.py CHANGED
@@ -599,18 +599,17 @@ async def _run_apify_actor_for_web_content(url: str, api_token: str, actor_id: s
599
  }
600
  logger.debug(f"{log_prefix} Using input format for Default YT Actor ({APIFY_ACTOR_ID}) with Residential Proxy")
601
  # --- CORRECTED BLOCK START (Ensure this 'elif' has same indentation as the 'if' above) ---
602
- elif actor_id == APIFY_STRUCTURED_YT_ACTOR_ID:
603
- # Input specific to the Structured YT Actor wrap your single URL in a list
604
  run_input = {
605
- "urls": [url], # ← wrap your URL in a list
606
  "proxyConfiguration": {
607
  "useApifyProxy": True,
608
  "apifyProxyGroups": ["RESIDENTIAL"],
609
  },
610
  "maxRetries": 5,
611
  }
612
- # Log using the actor_id variable passed into the function
613
- logger.debug(f"{log_prefix} Using list input format for Structured YT Actor ({actor_id}) with Residential Proxy")
614
  # --- END ADDED PROXY CONFIG ---
615
  # (Extra brace and redundant logger call removed from here)
616
  elif actor_id == APIFY_TEXT_SCRAPER_ACTOR_ID:
 
599
  }
600
  logger.debug(f"{log_prefix} Using input format for Default YT Actor ({APIFY_ACTOR_ID}) with Residential Proxy")
601
  # --- CORRECTED BLOCK START (Ensure this 'elif' has same indentation as the 'if' above) ---
602
+ elif actor_id == APIFY_STRUCTURED_YT_ACTOR_ID:
603
+ # Input for the Structured YT extractor actor must use a single "url" string
604
  run_input = {
605
+ "url": url,
606
  "proxyConfiguration": {
607
  "useApifyProxy": True,
608
  "apifyProxyGroups": ["RESIDENTIAL"],
609
  },
610
  "maxRetries": 5,
611
  }
612
+ logger.debug(f"{log_prefix} Using input format for Structured YT Actor ({actor_id}) with Residential Proxy")
 
613
  # --- END ADDED PROXY CONFIG ---
614
  # (Extra brace and redundant logger call removed from here)
615
  elif actor_id == APIFY_TEXT_SCRAPER_ACTOR_ID: