全球主机交流论坛

标题: 【电报小工具】让你的 Telegram 名字随时间变化 [打印本页]

作者: CodyDoby    时间: 2019-1-23 16:14
标题: 【电报小工具】让你的 Telegram 名字随时间变化
本帖最后由 CodyDoby 于 2019-1-23 16:50 编辑

Telegram-Name-Updating:Update (first/last/user) name of Telegram user every 30 seconds.
# Updated:
#     1. 使用async来update lastname,更加稳定
#     2. 增加emoji clock,让时间显示更加有趣味

参考文档:Telethon官方文档 https://telethon.readthedocs.io

lastname实时更新效果:https://t.me/CodyDoby

0. 准备
运行环境:VPS,python3,python3-pip

创建应用:https://my.telegram.org/。只要填App title和Short name即可。获得api_id和api_hash。

1. 下载Demo小程序到VPS上
  1. git clone https://github.com/xyou365/Telegram-Name-Updating.git
  2. cd Telegram-Name-Updating
复制代码

2. 安装telethon
  1. pip3 install -r requirements.txt
复制代码

3. 运行Demo小程序
  1. python3 tg_username_update.py
复制代码

4. api认证和用户登陆

根据提示输入api_id和api_hash。接着输入手机号和验证码,如果账号开启了二次验,证根据提示再输入二次验证的密码。最后看到 It works! 表明成功了。 默认的是每30秒钟按照一定概率更新一次lastname到特定模式。



终端log,你的Telegram lastname也就长这样了:




作者: the_one    时间: 2019-1-23 18:09
不是很懂
作者: CodyDoby    时间: 2019-1-23 18:15
the_one 发表于 2019-1-23 18:09
不是很懂

看效果先?也就是闹着玩

效果: https://t.me/CodyDoby
作者: nutterchen    时间: 2019-1-28 00:29
我可以把这个改成广告专用吗?

作者: sgwyhwt    时间: 2019-1-28 00:35
nutterchen 发表于 2019-1-28 00:29
我可以把这个改成广告专用吗?

大佬真的是随时都能发现商机呀
作者: CodyDoby    时间: 2019-1-28 00:40
nutterchen 发表于 2019-1-28 00:29
我可以把这个改成广告专用吗?

想见识下哈
作者: nutterchen    时间: 2019-1-28 00:54
CodyDoby 发表于 2019-1-28 00:40
想见识下哈

就是再last name换成广告
作者: zlhdd108    时间: 2019-12-11 14:34
真的是处处是商机
作者: CodyDoby    时间: 2019-12-11 21:11
zlhdd108 发表于 2019-12-11 14:34
真的是处处是商机

这种还行还行
作者: lisonglin980    时间: 2022-2-16 20:39

王德法

Edge 98Windows 11 64Bit
root@ss5-HK:~/Telegram-Name-Updating# python3 tg_username_update.py
Traceback (most recent call last):
File “/root/Telegram-Name-Updating/tg_username_update.py”, line 17, in
from emoji import emojize
ModuleNotFoundError: No module named ’emoji’
现在是不可以用了吗
作者: hsu    时间: 2022-2-16 22:56
cody前年的技术,你自己用了,今天才公开




欢迎光临 全球主机交流论坛 (https://hostloc.gdisk.cf/) Powered by Discuz! X3.4