Microlink × Telegram
Interact withtelegram.me
telegram.js
import createClient from 'microlink.io'
const microlink = createClient()
const telegram = async (url, opts) => {
const result = await microlink.metadata(url, {
data: {
subscribers: {
selector: '.tgme_channel_info_counter:nth-child(1) .counter_value'
},
photos: {
selector: '.tgme_channel_info_counter:nth-child(2) .counter_value'
},
links: {
selector: '.tgme_channel_info_counter:nth-child(3) .counter_value'
}
},
...opts
})
return result
}
const result = await telegram('https://telegram.me/s/teslahunt')
console.log(result)