
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
tgstat-parser
Advanced tools
A modular JavaScript parser for extracting Telegram channel data from TgStat website.
This script extracts structured data from Telegram channel listings on TgStat website (telega.in), including:
javascript:(function(){const script=document.createElement('script');script.src='https://raw.githubusercontent.com/yourusername/tgstat-parser/main/tgstat_parser/browser-url-fetcher.js';document.body.appendChild(script);script.onload=function(){window.tgStatParser.showUI()}})();
Install the package:
npm install -g tgstat-parser
Parse a telega.in URL:
tgstat-parser https://telega.in/catalog/investments
Options:
-h, --help Show help message
-s, --selector <sel> CSS selector for channel elements (default: '.channels-item')
--no-json Disable JSON export
--no-csv Disable CSV export
--json-file <file> JSON output filename (default: 'tgstat_channels.json')
--csv-file <file> CSV output filename (default: 'tgstat_channels.csv')
Load the script directly in the browser console:
// Load the standalone script
const script = document.createElement('script');
script.src = 'https://raw.githubusercontent.com/yourusername/tgstat-parser/main/tgstat_parser/browser-url-fetcher.js';
document.body.appendChild(script);
// After script is loaded
script.onload = function() {
// Show UI
window.tgStatParser.showUI();
// Or parse URL directly
window.tgStatParser.parseUrl('https://telega.in/catalog/investments');
};
const { extractFromUrl } = require('tgstat-parser/urlFetcher');
const { saveToJson } = require('tgstat-parser/exportUtils');
async function parseData() {
const url = 'https://telega.in/catalog/investments';
const channels = await extractFromUrl(url);
// Save to file
saveToJson(channels, 'channels.json');
// Do something with the data
console.log(`Parsed ${channels.length} channels`);
}
parseData().catch(console.error);
main.js - Main entry point for processing HTML already in the browserurlFetcher.js - Module for fetching and parsing content from telega.in URLsparser.js - Core parsing logic to process multiple channel elementschannelExtractor.js - Logic for extracting data from individual channel elementsdomUtils.js - Utility functions for working with DOM elementsexportUtils.js - Functions for exporting data to JSON and CSV formatscli.js - Command line interface for Node.js usagebrowser-url-fetcher.js - Bundled version for browser usage with UIpackage.json - Project configuration and dependenciesThe parser extracts data into this structure:
{
channelId: "67387",
channelName: "Павел Шумилов",
description: "Авторский канал. Акции России, США, Китая...",
subject: "Инвестиции",
metrics: {
subscribers: 18057,
rating: 122.0,
apr: 4082,
err: 22.6,
cpv: 3.75
},
price: {
original: 18000.0,
discounted: 15300.0,
discountPercent: 15,
discountType: "sale"
},
avatarUrl: "/system/channels/avatars/000/067/387/original/eviNUoDO3Hw.jpg",
channelAdded: "catalog"
}
MIT
FAQs
A parser for extracting Telegram channel data from TgStat website
We found that tgstat-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.