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
CnCL - CnCLess it's an Easy to deploy Botnet without CnC/C2

CnCL CnCLess it's an Easy to deploy Botnet without CnC/C2, Harder to track and t

ZSendokame 2 Jan 10, 2022
A python telegram bot to fetch the details of an ipadress with help of ip-api

ipfetcher A python(Pyrogram) oriented telegram bot to fetch the details of an ipadress developed by @riz4d with the API of https://ip-api.com Deployme

Mohamed Rizad 5 Mar 12, 2022
AWS Lambda - Parsing Cloudwatch Data and sending the response via email.

AWS Lambda - Parsing Cloudwatch Data and sending the response via email. Author: Evan Erickson Language: Python Backend: AWS / Serverless / AWS Lambda

Evan Scott Erickson 1 Nov 14, 2021
PS4RemotePKGSender - Use with Remote PKG Installer

PS4_Remote_PKG_Sender Used with the remote PKG installer on PS4 Thanks to the au

Teri 4 Sep 23, 2022
A python package to easy the integration with Direct Online Pay (Mpesa, TigoPesa, AirtelMoney, Card Payments)

A python package to easy the integration with Direct Online Pay (DPO) which easily allow you easily integrate with payment options once without having to deal with each of them individually;

Jordan Kalebu 2 Nov 25, 2021
Simple software that can send WhatsApp message to a single or multiple users (including unsaved number**)

wp-automation Info: this is a simple automation software that sends WhatsApp message to single or multiple users. Key feature: -Sends message to multi

3 Jan 31, 2022
Graviti TensorBay Python SDK

TensorBay Python SDK is a python library to access TensorBay and manage your datasets. It provides: A pythonic way to access your

Graviti 72 Aug 22, 2022
Graviti-python-sdk - Graviti Data Platform Python SDK

Graviti Python SDK Graviti Python SDK is a python library to access Graviti Data

Graviti 13 Dec 15, 2022
Um script simples para consultar dados, com API's simples.

Info sobre o Script Esta é uma das mais simples ferramentas para consultar dados. Daqui um tempo eu farei um UPGRADE no painel, irei adicionar um banc

Crowley 6 Apr 11, 2022
See trending stock tickers on Reddit and check Stock perfomance

See trending stock tickers on Reddit and check Stock perfomance

Abbas 1.5k Jan 06, 2023
Sample code helps get you started with a simple Python web service using AWS Lambda and Amazon API Gateway

Welcome to the AWS CodeStar sample web service This sample code helps get you started with a simple Python web service using AWS Lambda and Amazon API

0 Jan 20, 2022
Discord Streaming Statut (Bot/SelfBot)

Discord-Streaming-Status Discord Streaming Status For Both User Accounts And Bot Accounts. Open your cmd and enter the command: pip install discord BE

Komuro 2 Nov 02, 2021
A Python API For Questionnaire

Инструкция по разворачиванию приложения Окружение проекта: python 3.8 Django 2.2.10 djangorestframework Склонируйте репозиторий с помощью git: git clo

2 Feb 14, 2022
𝐀 𝐦𝐨𝐝𝐮𝐥𝐚𝐫 𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 𝐆𝐫𝐨𝐮𝐩 𝐦𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭 𝐛𝐨𝐭 𝐰𝐢𝐭𝐡 𝐮𝐥𝐭𝐢𝐦𝐚𝐭𝐞 𝐟𝐞𝐚𝐭𝐮𝐫𝐞𝐬 !!

𝐇𝐨𝐰 𝐓𝐨 𝐃𝐞𝐩𝐥𝐨𝐲 For easiest way to deploy this Bot click on the below button 𝐌𝐚𝐝𝐞 𝐁𝐲 𝐒𝐮𝐩𝐩𝐨𝐫𝐭 𝐆𝐫𝐨𝐮𝐩 𝐒𝐨𝐮𝐫𝐜𝐞𝐬 𝐆𝐞𝐧𝐞?

Mukesh Solanki 1 Dec 10, 2021
Assassination API for getting random quotes from Assassination Classroom.

Assassination API Take advantage of what you have, while you have it. Quotes from Assassination Classroom Assassination classroom is one of best anime

Swanand Mulay 3 Jul 15, 2022
Twitter Analysis of MIUUL CEO

Twitter Analysis of MIUUL CEO Business Problem I got last @mvahitkeskin 184 twee

Çağrı Karadeniz 6 Mar 12, 2022
The program for obtaining a horoscope in Python using API from rapidapi.com site.

Python horoscope The program allows you to get a horoscope for your zodiac sign and immediately translate it into almost any language. Step 1 The firs

Architect 0 Dec 25, 2021
API to retrieve the number of grades on the OGE website (Website listing the grades of students) to know if a new grade is available. If a new grade has been entered, the program sends a notification e-mail with the subject.

OGE-ESIREM-API Introduction API to retrieve the number of grades on the OGE website (Website listing the grades of students) to know if a new grade is

Benjamin Milhet 5 Apr 27, 2022
Scrape the Twitter Frontend API without authentication.

Twitter Scraper 🇰🇷 Read Korean Version Twitter's API is annoying to work with, and has lots of limitations — luckily their frontend (JavaScript) has

Buğra İşgüzar 3.4k Jan 08, 2023
Public Mirror of Team 15's Code and Reports for RBE 3002 B21

RBE3002 Team 15 Lab Repository Team 15's Repository for all code written for RBE 3002 using the Robotis TurtleBot3 Written By Matthew Haahr, Leo Morri

Matthew Haahr 3 Mar 21, 2022