Skip to main content
Glama
josuekongolo

CompanyIQ MCP Server

by josuekongolo
test-scraper-979420773.js2.02 kB
import { BrowserScraper } from './build/scraper/browser_scraper.js'; import { readFileSync } from 'fs'; const OPENAI_API_KEY = "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"; console.log('🧪 Testing COMPLETE BrowserScraper Flow for 979420773\n'); console.log('═'.repeat(60)); async function test() { try { const scraper = new BrowserScraper(OPENAI_API_KEY, '979420773'); console.log('\n🚀 Running full scraper (Chromium + Download + Extract + Save)...\n'); const results = await scraper.getAllFinancialYears('979420773'); console.log('\n═'.repeat(60)); console.log('📊 SCRAPER RESULTS'); console.log('═'.repeat(60)); console.log(`Total years extracted: ${results.length}\n`); results.forEach(r => { console.log(`Year ${r.year}:`); console.log(` Revenue: ${r.revenue ? (r.revenue/1000000).toFixed(1) + 'M NOK' : 'null'}`); console.log(` Profit: ${r.profit ? (r.profit/1000000).toFixed(1) + 'M NOK' : 'null'}`); console.log(` Assets: ${r.assets ? (r.assets/1000000).toFixed(1) + 'M NOK' : 'null'}`); console.log(` Equity: ${r.equity ? (r.equity/1000000).toFixed(1) + 'M NOK' : 'null'}`); console.log(` Source: ${r.source}`); console.log(''); }); // Verify JSON files were created console.log('═'.repeat(60)); console.log('📁 VERIFYING JSON FILES'); console.log('═'.repeat(60)); for (const r of results.slice(0, 3)) { try { const json = JSON.parse(readFileSync(`./data/extracted/979420773/financial_data_${r.year}.json`, 'utf-8')); console.log(`✅ ${r.year}: Revenue=${json.revenue ? (json.revenue/1000000).toFixed(1)+'M' : 'null'}`); } catch (e) { console.log(`❌ ${r.year}: JSON file not found`); } } } catch (error) { console.error('\n❌ Test failed:', error.message); console.error(error.stack); } } test();

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/josuekongolo/companyiq-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server