Telegram 隨機色圖,支援每日自動爬取

Overview

Telegram 隨機色圖機器人

使用此原始碼的Bot

開放的隨機色圖機器人: @katonei_bot

已實現的功能

  • 爬取每日R18排行榜
  • 不夠色!再來一張
  • Tag 索引,指定Tag色圖
  • 將爬取到的色圖轉為 WebP 格式儲存,節省空間

需要注意的事件

  • 好久之前的怪東西,代碼質量不保證
  • 請在使用API前修改 cookie.conf,將自己的pixiv登錄cookie填入(R-18內容必須登錄才能請求)
  • 請啟動 app.py, bot.py 兩個 python 檔,app.py 為 WebAPI,運行於 8080
  • 定時任務需要外部實現(定時請求指定API)
  • 可能不支援 Python 3.6 以前的版本

使用教程

1. 安裝依賴庫

pip3 install python-telegram-bot
pip3 install requests
pip3 install web.py
pip3 install pillow

2. 申請 Bot Token (如果你有token可以跳過這一步)

  • 私訊 @BotFather,申請 Bot Token
  • 將申請到的 BotToken 填入 bot.py 的第 7 行,如 123456789:IAWUGHIGEBIEGHEJguegvhsig

3. 啟動 Bot 和 WebAPI

nohup python3 app.py &
nohup python3 bot.py &

4. 手動設定定時任務

  • xxx.xxx.xxx.xxx:8080/api/updateNow 爬取每日 R-18 排行榜 (一天一次)
    • 返回值:ok
  • xxx.xxx.xxx.xxx:8080/api/tagsdb_update 更新tag索引列表 (每次爬取/更新圖庫完成後)
    • 返回值:ok
  • xxx.xxx.xxx.xxx:8080/api/list_update 更新全局索引列表 (每次爬取/更新圖庫完成後)
    • 返回值:ok

5. 結束!導入色圖庫或開始爬取

  • 關於命令:請發送 /help 給Bot查看如何操作
  • 導入色圖庫:我將會在整理完成已有的色圖庫後將其上載

完整API列表

  • xxx.xxx.xxx.xxx:8080/api/num 獲取隨機 imgid ( /webp/ 目錄內的索引)
    • 返回值:隨機imgid,如 19852
  • xxx.xxx.xxx.xxx:8080/api/num_tag?tag=tag名 指定 Tag 的隨機 imgid (需要先更新tag索引列表)
    • 返回值:隨機imgid
  • xxx.xxx.xxx.xxx:8080/api/updateNow 爬取每日 R-18 排行榜
    • 返回值:ok
  • xxx.xxx.xxx.xxx:8080/api/tagsdb_update 更新tag索引列表
    • 返回值:ok
  • xxx.xxx.xxx.xxx:8080/api/list_update 更新全局索引列表
    • 返回值:ok
You might also like...
A Telegram Bot for adding Footer caption beside main caption of Telegram Channel Messages.

Footer-Bot A Telegram Bot for adding Footer caption beside main caption of Telegram Channel Messages. Best for Telegram Movie Channels. Made by @AbirH

veez music bot is a telegram music bot project, allow you to play music on voice chat group telegram.
veez music bot is a telegram music bot project, allow you to play music on voice chat group telegram.

🎶 Veez Music Bot Music bot for playing music on telegram voice chat group. Requirements 📝 FFmpeg NodeJS nodesource.com Python 3.7+ PyTgCalls 🧪 Get

Poll-Bot Repo For Telegram #telegram

Intro This Is A Simple Bot To Create Poll In Channel and Groups And Also This Is our First Project Too.. Enter you tokens at these are very important

veez music is a telegram music bot project, allow you to play music on voice chat group telegram.
veez music is a telegram music bot project, allow you to play music on voice chat group telegram.

🎶 VEEZ MUSIC BOT Veez Music is a telegram bot project that's allow you to play music on telegram voice chat group. Requirements 📝 FFmpeg NodeJS node

Based Telegram Bot and Userbot To Play Music in Your Telegram Groups With Some Cool Extra Features! 🥰
Based Telegram Bot and Userbot To Play Music in Your Telegram Groups With Some Cool Extra Features! 🥰

CallMusicPlus69 This Repo base on! 🤗️ A CallsMusic Based Telegram Bot and Userbot To Play Music in Your Telegram Groups With Some Cool Extra Features

A simple telegram voting bot based on the python-telegram-bot api.

A simple telegram voting bot based on the python-telegram-bot api. *To make it more easy to use, I might make a C++ code in the future so you don't ha

An Telegram Bot By @AsmSafone To Stream Videos in Telegram Voice Chat. This is Also The Source Code of The Bot Which is Being Used In @SafoTheBot Group! ❤️

Telegram Video Player Bot (Beta) An Telegram Bot By @AsmSafone To Stream Videos in Telegram Voice Chat. Special Features Supports Live Streaming From

this is a telegram bot repository, that can stream video on telegram group video chat.
this is a telegram bot repository, that can stream video on telegram group video chat.

VIDEO STREAM BOT telegram bot project for streaming video on telegram video chat, powered by tgcalls and pyrogram 🛠 Commands: /vstream (reply to vide

Telegram bot implementing Lex Arcana using python-telegram-bot library.
Telegram bot implementing Lex Arcana using python-telegram-bot library.

Lex Arcana Telegram Bot 🤖 Telegram bot implementing Lex Arcana using python-telegram-bot library. This bot was evaluated for the course "Computer Eng

Owner
cluckbird
cluckbird
Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

SUBIN 449 Dec 27, 2022
null 1 Feb 18, 2022
Receive GitHub webhook events and send to Telegram chats with AIOHTTP through Telegram Bot API

GitHub Webhook to Telegram Receive GitHub webhook events and send to Telegram chats with AIOHTTP through Telegram Bot API What this project do is very

Dash Eclipse 33 Jan 3, 2023
This is telegram bot to generate string session for using user bots. You can see live bot in https://telegram.dog/string_session_Nsbot

TG String Session Generate Pyrogram String Session Using this bot. Demo Bot: Configs: API_HASH Get from Here. API_ID Get from Here. BOT_TOKEN Telegram

Anonymous 27 Oct 28, 2022
A telegram bot which can show you the status of telegram bot

BotStatus-Ts-Bot An open source telegram Bot Status bot For demo you can check here The status is updated in every 1 hour About Bot This is a Bot stat

Ts_Bots 8 Nov 17, 2022
Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API.

Tg_PHub_Bot Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API. OS Support All linu

TheProgrammerCat 13 Oct 21, 2022
A telegram bot that can upload telegram media files to anonfiles.com and give you direct download link

✯ AnonFilesBot ✯ Telegram Files to AnonFiles Upload Bot It will Also Give Direct Download Link Process : Fork This Repositry And Simply Cick On Heroku

Avishkar Patil 38 Dec 30, 2022
Telegram Radio - A User-bot who continuously play random audio files (from the famous telegram music channel @mveargasm) in the intended voice chat.

MvEargasmDJ: This is my submission for the Telegram Radio Project of Baivaru. Which required a userbot to continiously play random audio files from th

eyaadh 24 Nov 12, 2022
A Simple Telegram Bot By @AsmSafone to Download Files From Mega.nz and Upload It to Telegram

MegaDL-Bot A Simple Telegram Bot By @AsmSafone to Download Files From Mega.nz and Upload It to Telegram Features No Login Required All Mega.nz File Li

SAF ONE 92 Dec 2, 2022