Last active
November 14, 2019 11:13
-
-
Save defaultpage/a3cc6cc307f2273e63ce092a1e7db692 to your computer and use it in GitHub Desktop.
Скрипт для выгрузки списка каналов (подписки) пользователя через DevTools на web.telegram.org
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.element | |
.cache[1] | |
.data | |
.$injector | |
.get('MtpApiManager') | |
.invokeApi('messages.getAllChats', {except_ids: []}) | |
.then(e => { | |
console.log('--------------------------------') | |
console.log('ВСЕ КАНАЛЫ: '); | |
let channels = e.chats.filter(item => (item["_"] === 'channel')); | |
console.log(channels); | |
console.log('--------------------------------') | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.element | |
.cache[1] | |
.data | |
.$injector | |
.get('MtpApiManager') | |
.invokeApi('messages.getAllChats', {except_ids: []}) | |
.then(e => { | |
console.log('--------------------------------') | |
console.log('ВСЕ КАНАЛЫ: '); | |
let channels = ""; | |
e.chats.forEach(item => { | |
if (item["_"] === 'channel') { | |
channels += "\r\n" + item.id + "\t" + item.username + "\t" + item.title; | |
} | |
}); | |
console.log(channels); | |
console.log('--------------------------------') | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment