delimit-cli 4.0.6 → 4.1.1

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.
@@ -560,37 +560,3 @@ def _save_scan(result: Dict[str, Any], scan_time: datetime) -> Path:
560
560
  path.write_text(json.dumps(result, indent=2, default=str))
561
561
  logger.info("Scan saved to %s", path)
562
562
  return path
563
-
564
-
565
- def fetch_thread(thread_id: str, *, proxy_url: str = PROXY_URL) -> Optional[Dict[str, Any]]:
566
- """Fetch a single Reddit thread by ID via the residential proxy."""
567
- import urllib.parse
568
- import urllib.request
569
- reddit_url = f"https://www.reddit.com/comments/{thread_id}.json?raw_json=1"
570
- fetch_url = f"{proxy_url}?url={urllib.parse.quote(reddit_url, safe='')}"
571
-
572
- req = urllib.request.Request(
573
- fetch_url,
574
- headers={"User-Agent": "delimit-scanner/1.0", "Accept": "application/json"},
575
- )
576
-
577
- try:
578
- with urllib.request.urlopen(req, timeout=15) as resp:
579
- data = json.loads(resp.read().decode())
580
- if isinstance(data, list) and len(data) > 0:
581
- post_data = data[0].get("data", {}).get("children", [{}])[0].get("data", {})
582
- if post_data:
583
- return {
584
- "id": post_data.get("id", ""),
585
- "title": post_data.get("title", ""),
586
- "author": post_data.get("author", ""),
587
- "score": post_data.get("score", 0),
588
- "num_comments": post_data.get("num_comments", 0),
589
- "subreddit": post_data.get("subreddit", ""),
590
- "permalink": post_data.get("permalink", ""),
591
- "selftext": post_data.get("selftext", ""),
592
- "created_utc": post_data.get("created_utc", 0),
593
- }
594
- except Exception as exc:
595
- logger.warning("Failed to fetch thread %s: %s", thread_id, exc)
596
- return None
@@ -22,7 +22,7 @@ logger = logging.getLogger("delimit.ai.screen_record")
22
22
 
23
23
  # ── Constants ────────────────────────────────────────────────────────────
24
24
 
25
- CHROMIUM_PATH = "/root/.cache/puppeteer/chrome/linux-146.0.7680.153/chrome-linux64/chrome"
25
+ CHROMIUM_PATH = os.environ.get("CHROMIUM_PATH", "chromium")
26
26
  CONTENT_BASE = Path.home() / ".delimit" / "content"
27
27
  VIDEOS_DIR = CONTENT_BASE / "videos"
28
28
  GIFS_DIR = CONTENT_BASE / "gifs"