|
2 days ago | |
---|---|---|
README.md | 2 days ago | |
TGForwarder.py | 2 days ago | |
TGNetDiskLinkChecker.py | 2 weeks ago | |
requirements.txt | 4 weeks ago |
tgsearch、tgsou需要配置一堆频道群组,完全可以跑个定时任务监控这些频道群组,把网盘、磁力资源全都转发到自己的频道,这样只需要配置一个就可以
效果参考:https://t.me/s/tgsearchers
TGNetDiskLinkChecker.py
脚本用于检测网盘链接有效性,并自动删除链接失效的消息,目前支持 夸克、天翼、阿里云、115、123、百度、UC
在线获取TG session(选择V1): https://tg.uu8.pro/
api_id和api_hash获取:https://my.telegram.org/
github上公开的
api_id = 2934000
api_hash = "7407f1e353d48363c48df4c8b3904acb"
api_id = '27335138'
pi_hash = '2459555ba95421148c682e2dc3031bb6'
api_id = 6627460
api_hash = '27a53a0965e486a2bc1b1fcde473b1c4'
checknum
条消息去重,当日转发总数大于checknum
时,则检测当日转发总数消息/start
获取资源链接,自动还原为urlTGForwarder().clear()
方法name: TGForwarder # 工作流程的名称
on: # 什么时候触发
schedule:
- cron: '1 7-23 * * *' # 定时触发
push:
paths-ignore:
- '**' # 忽略文件变更, **忽略所有
jobs: # 执行的工作
run_demo_actions:
runs-on: ubuntu-latest # 在最新版本的 Ubuntu 操作系统环境下运行
steps: # 要执行的步骤
- name: Checkout code
uses: actions/checkout@v4 # 用于将github代码仓库的代码拷贝到工作目录中
with:
# 转到 Settings > Secrets and variables > Actions
# 点击 New repository secret,添加 Secret,名称为 BOT,输入你的token
token: ${{ secrets.BOT }}
- name: Set up Python
uses: actions/setup-python@v2 # 用于设置 Python 环境,它允许你指定要在工作环境中使用的 Python 版本
with:
python-version: '3.10.10' # 选择要用的Python版本
- name: Install requirements.txt
run: | # 安装依赖包
pip install -r ./requirements.txt
- name: Run TGForwarder.py
run: python TGForwarder.py # 执行py文件
- name: Commit and push history.json file
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add history.json
git commit -m "Update history.json file" || echo "No changes to commit"
git push https://${{ secrets.BOT }}:x-oauth-basic@github.com/${GITHUB_REPOSITORY}.git