This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// import { extractTextFromFile, extractTextFromWebsite } from './src/utils/text-extractor'; | |
/** | |
* Advanced Web Scraping Implementation | |
* | |
* This module provides three approaches for extracting text from websites: | |
* | |
* 1. extractTextFromWebsite() - Fast Cheerio-based scraping for traditional websites | |
* 2. extractTextFromWebsitePuppeteer() - Puppeteer-based scraping for SPAs/React/Next.js sites | |
* 3. extractTextFromWebsiteHybrid() - Intelligent hybrid approach (RECOMMENDED) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Concrete User Token Calculator - Guaranteed Attribution | |
Uses trace ID matching for 100% accurate user-to-LLM token attribution | |
""" | |
import sqlite3 | |
import json | |
import argparse | |
from typing import Dict, List, Optional |