Coder Social home page Coder Social logo

gu-picbot's Introduction

✏ 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.

gu-picbot's People

Contributors

googujiang avatar windleaf233 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.