Skip to content

Instantly share code, notes, and snippets.

View ParsaHarooni's full-sized avatar

Parsa Harooni ParsaHarooni

  • Tehran, Iran
View GitHub Profile
@ParsaHarooni
ParsaHarooni / channel.js
Created January 8, 2018 11:39
Get telegram channel member count.
// npm install request
// npm install cheerio
const request = require("request");
const cheerio = require("cheerio")
function getMembersCount(channel) {
return new Promise((resolve, reject) => {
request(`https://t.me/${channel}/?pagehidden=false`, (error, resp, body) => {
const data = cheerio.load(body, {normalizeWhitespace:true});