GooGuJiang / Gu-PicBot

🤖GooGu's Illustration Downloading BOT

Home Page:https://t.me/Goo_moe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

✏ GooGu's Illustration Downloading BOT

✏ A Telegram bot that can download images from Pixiv and Twitter and upload them to Telegram channels.

English | 简体中文

😀 Features

  • Subscribe to Pixiv favorites based on RssHub and push them
  • Parse Pixiv links and push them
  • Parse Twitter links and push them

🤔 Quick Start

Docker Docker

  1. Pull Docker image
$ docker pull googujiang/gu-picbot
  1. Create bot data folder
$ mkdir ~/gu-picbot
  1. Create and run container
$ docker run --name gu-picbot \
    -v ~/gu-picbot:/data \
    -e CHANNEL_ID=<channel_id> \
    -e BOT_TOKEN=<bot_token> \
    -e RSS_URL=<rss_url> \
    -e REFRESH_TOKEN=<refresh_token> \
    -e BOT_ADMIN=<bot_admin> \
    -d googujiang/gu-picbot

Note:

  • Please refer to the following ❤️ Configuration for <channel_id>, <bot_token>, <rss_url>, <refresh_token>.

  • Use , to separate multiple BOT_ADMIN.

Normal Way

  1. Make sure the python version is >=3.6.*.

  2. Clone this repository:

$ git clone https://github.com/GooGuJiang/Gu-Random-Image.git
  1. Install required libraries:
$ pip install -r requirements.txt
  1. Run initialization:
$ python3 main.py
  1. Fill in the configuration file.

  2. Run:

$ python3 main.py

🤖 Command List

Currently, only Pixiv and Twitter links can be parsed, and more functions will be added later.

❤️ Configuration

Here is a detailed description of the configuration parameters:

Parameter Description
REFRESH_TOKEN The Refresh token with Pixiv login
RSS_URL The URL of the RSS subscription
BOT_TOKEN The Telegram bot token
CHANNEL_ID The unique identifier of the channel or group to send messages
BOT_ADMIN A list of user IDs of the bot administrator
RSS_SECOND The time interval (in seconds) for RSS update check
PROXY URL of the proxy server
PROXY_OPEN Whether to enable the proxy server
LOG_OPEN Whether to enable logging
FILE_DELETE Whether to delete the downloaded file after downloading

Note:

  • REFRESH_TOKEN, BOT_TOKEN, and CHANNEL_ID are required parameters, and must be correctly configured to run the bot.
  • The RSS_URL and RSS_OPEN parameters are used to enable and configure the RSS subscription function, and are optional.
  • The PROXY and PROXY_OPEN parameters are used to enable and configure the proxy server, and are optional.
  • The BOT_ADMIN parameter is used to configure bot administrators, who have special permissions to manage the bot.
  • The value of the parameter must be enclosed in double quotes, and must be connected to the parameter name with an equal sign.

⁉️ Known Issues

Encounter Cloudflare version 2 Captcha when starting up Solution:

It has been solved by a hardcore method, but if it still doesn't work after 10 automatic retries, it may be an IP problem.

Acknowledgements

Some of the code for downloading Twitter images comes from Twitter media downloader.

About

🤖GooGu's Illustration Downloading BOT

https://t.me/Goo_moe

License:Apache License 2.0


Languages

Language:Python 99.2%Language:Dockerfile 0.8%