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
Owner
cluckbird
cluckbird
Exporta archivos masivamente del TEC Digital.

TEC Digital Files Exporter Script que permite exportar los archivos de cursos del TEC Digital del Instituto Tecnológico de Costa Rica, debido al borra

Joseph Vargas 22 Apr 08, 2021
Telegram bot for logistic - Telegram bot for logistic

Демонстрационный телеграм-бот для нужд транспортной компании Цель проекта Реализ

M1chigun 1 Feb 05, 2022
bot for hearthstone mercenaries

Hearthstone-Mercenaries-game-bot - prevention: Bot is not ready and now on the development stage estimated release date - 21.10.21 The main idea of th

Andrew Efimov 59 Dec 12, 2022
Syrax Check User Bot Discord.py

Syrax-Check-User-Bot-Discord.py Guida Italiana il bot nasce con lo scopo di poter caricare il proprio nome utente,tag e foto profilo al forum tramite

Pippoide 0 Feb 04, 2022
Provide fine-grained push access to GitHub from a JupyterHub

github-app-user-auth Provide fine-grained push access to GitHub from a JupyterHub. Goals Allow users on a JupyterHub to grant push access to only spec

Yuvi Panda 20 Sep 13, 2022
EZPZ-PGP: This is a simple and easy to use PGP tool.

EZPZ-PGP This is a simple and easy to use PGP tool. Features [X] Create new PGP Keypairs, able to choose between 4096 and 8192 bit keys.\n [X] Import

6 Dec 30, 2022
ShadowClone allows you to distribute your long running tasks dynamically across thousands of serverless functions and gives you the results within seconds where it would have taken hours to complete

ShadowClone allows you to distribute your long running tasks dynamically across thousands of serverless functions and gives you the results within seconds where it would have taken hours to complete

240 Jan 06, 2023
An unoffcial python API client for primeuploads.com

primeuploads-py An unoffcial python API wrapper for primeuploads.com Installation pip3 install primeuploads-py Usage example from prime import PrimeUp

W4RR10R 41 Dec 05, 2022
Draw your telegram bot in draw.io and generate its code

README Contents: Draw your bot Install requirements Registering a telegram bot Draw bot Start point Message block Single choice block Functions block

DENIS TSITKO 23 Nov 09, 2022
Instagram Bot posting earthquakes with magnitude greater than or equal to 3.5.

Instagram Bot posting earthquakes with magnitude greater than or equal to 3.5

Alican Yüksel 4 Aug 22, 2022
🔪 Block replies to viral tweets from users getting paid to promote useless products

This Tweet Took Off Ublock Origin filter list targeting long reply chains posted by twitter users who get paid to promote random products on viral twe

Xetera 12 Jan 14, 2022
A powerful application to automatically deploy GitHub Release.

A powerful application to automatically deploy GitHub Release.

Fentaniao 43 Sep 17, 2022
Simple Telegram Bot for generating BalckPearl BBCode Templates

blackpearl-bbcode-bot Simple Telegram Bot for generating BlackPearl BBCode Templates Written in Pyrogram Features - 🎉 IMDB Info fetching from files -

D. Luffy 5 Oct 19, 2022
Powerful Telegram userbot to turn your PROFILE PICTURE & LAST NAME into a real time clock & to change your BIO automatically.

DATE_TIME_USERBOT-TeLeTiPs Powerful Telegram userbot to turn your PROFILE PICTURE & LAST NAME into a real time clock & to change your BIO automaticall

53 Jan 05, 2023
Auto filter bot for python

Media Search bot Index channel or group files for inline search. When you post file on telegram channel or group this bot will save that file in datab

1 Dec 22, 2021
Amazon AWS Web Tool (view only)

Amazon AWS Web Tool (AAWT) discontinued Features Cloudfront (simple) EC2 (With Charts and Prices) EC2 Reserved EBS ELB (With Charts) Obs:. only classi

Carlos Augusto Malucelli 9 Nov 07, 2022
Cloudshell-sandbox-reporter - Helper modules and classes for writing to Cloudshell sandbox console

Cloudshell Sandbox Reporter This project provides utility classes for formatting

QualiLab 2 Sep 07, 2022
A simple Python wrapper for the archive.is capturing service

archiveis A simple Python wrapper for the archive.is capturing service. Installation pipenv install archiveis Python Usage Import it. import archi

PastPages 157 Dec 28, 2022
An API wrapper around Discord API written in Python

Diskord This library is a maintained fork of now archived library, discord.py. A modern and easy to use API wrapper around Discord API written in Pyth

Diskord 36 Aug 22, 2022
Telegram bot made with Python to get notified when visa slots are available

Visa slot bot I created this bot to getnotified when screenshots are available in the Telegram channel for dropbox appointments. How do I use this? Ch

Jimil 7 Jan 03, 2023