Skip to main content
Glama

Telegram MCP Server

by DLHellMe
test_scraper.js1.56 kB
// Test script to verify scraper handles restricted content import { TelegramScraper } from './dist/scraper/telegram-scraper.js'; async function testScraper() { const scraper = new TelegramScraper(); try { console.log('Starting test scrape of getrichortech channel...'); const result = await scraper.scrape({ url: 'https://t.me/getrichortech', maxPosts: 20, // Just get first 20 posts for testing includeReactions: true }); console.log('\n=== SCRAPE RESULTS ==='); console.log(`Channel: ${result.channel.name} (@${result.channel.username})`); console.log(`Total posts found: ${result.posts.length}`); // Check for restricted content const restrictedPosts = result.posts.filter(post => post.content.includes('[Restricted content:') ); console.log(`\nRestricted posts found: ${restrictedPosts.length}`); if (restrictedPosts.length > 0) { console.log('\nRestricted post examples:'); restrictedPosts.slice(0, 3).forEach(post => { console.log(`- Post ${post.id}: ${post.content}`); }); } // Check for empty posts const emptyPosts = result.posts.filter(post => post.content.includes('[Empty post]') || post.content.includes('[No text content]') ); console.log(`\nEmpty posts found: ${emptyPosts.length}`); console.log('\nTest completed successfully!'); } catch (error) { console.error('Test failed:', error); } finally { await scraper.close(); } } testScraper();

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/DLHellMe/telegram-mcp-server'

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