GithubHelp home page GithubHelp logo

akynazh / tg-search-bot Goto Github PK

View Code? Open in Web Editor NEW
178.0 1.0 27.0 7.94 MB

A telegram bot for searching.

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

License: GNU General Public License v3.0

Python 99.84% Dockerfile 0.16%
bot python python3 telegram telegram-bot jav pikpak spider dmm redis-cache

tg-search-bot's Introduction

tg-search-bot

All Contributors

A Telegram bot that can be used to search for various video magnet links. It supports operations such as collection, exporting records, and automatically saving magnet links. It can be manually configured to block NSFW content and proxy Internet access.

The bot is built based on Python3, supports one-click deployment with Docker, and implements caching functions through Redis.

README documentation in other languages(auto generated by translate-readme): Arabic, Hindi, French , 简体中文, 繁体中文.

Functions

The following functions are sorted by development completion time, and new functions will be continuously added in the future.

  • Supports obtaining basic video information and magnet links - 2022/11/25
  • Support configuration proxy - 2022/11/26
  • Support filtering magnet links (uncensored => hd => subtitle)- 2022/11/26
  • Support allowing bot to automatically save optimal magnet links to Pikpak - 2022/12/29
  • Support getting preview video and full video - 2022/12/31
  • Support obtaining video screenshots - 2023/01/01
  • Support collection of actors and videos - 2023/01/04
  • Support deployment via docker - 2023/01/08
  • Supports obtaining actor rankings and film ratings - 2023/01/20
  • Supports random access to high-scoring videos and latest videos - 2023/01/25
  • Support obtaining actors’ Chinese names through Wikipedia - 2023/02/18
  • Support translation of Japanese titles - 2023/02/18
  • Support searching for actors - 2023/02/18
  • Support caching through redis - 2023/03/17

Tutorial

First, you need to download the project code locally, then configure the bot and edit ~/.tg_search_bot/config.yaml

# required, your telegram chat id
tg_chat_id:
# required, your telegram bot token
tg_bot_token:
# required, global proxy, 1 yes | 0 no
use_proxy:
# required, dmm proxy, 1 yes | 0 no
use_proxy_dmm:
# optional, proxy server address (required if use_proxy == 1 or use_proxy_dmm == 1)
proxy_addr:
# required, pikpak’s automatic sending function, 1 yes | 0 no
use_pikpak:
# optional, your telegram api id (required if use_pikpak == 1)
tg_api_id:
# optional, your telegram api hash (required if use_pikpak == 1)
tg_api_hash:
# required, enable cache or not, 1 yes | 0 no
use_cache:
# optional, your redis host (required if use_cache == 1)
redis_host:
# optional, your redis port (required if use_cache == 1)
redis_port:
# optional, your redis password
redis_password:
# required, enable nsfw or not, 1 yes | 0 no
enable_nsfw: 0

PS: If you want to use Pikpak’s automatic sending function, you need to authorize it manually first: Pikpak official bot, and then log in when running the bot for the first time. (My Pikpak invitation code: 99492001, enter to get membership)

Finally, run the bot: (files such as records and logs are located in ~/.tg_search_bot)

# op1. docker-compose
docker-compose up -d
# op2. simple way (Python >=3.9)
pip install -r requirements.txt && python3 bot.py

Development

I use python-3.9.13 for development. Please use python <= 3.9 for development. In addition, it is recommended to use python virtual environment development to avoid unnecessary problems. The following are my development steps for reference only:

git clone https://github.com/akynazh/tg-search-bot.git
cd tg-search-bot
~/.pyenv/versions/3.9.13/bin/python -m venv .venv
source ./.venv/bin/activate
pip3 install -r requirements.txt

Then you can start writing code. When you are done, remember to write or run a test instance (in tests/test.py). Please make sure there is no problem with the test before submitting the code.

Todo

  • English version
  • Video search supports more magnetic websites (currently only The Pirate Bay is supported)
  • Other features you would like to see appear...

Acknowledgments

Jack Bryant
Jack Bryant

🚧
zhhh
zhhh

💻
All Contributors
All Contributors

📖
Jack Bryant
Julia

💻

If you also want to contribute to the community, please check out todo list and read development steps, issues and prs are welcome.

tg-search-bot's People

Contributors

akynazh avatar allcontributors[bot] avatar github-actions[bot] avatar z-hhh avatar

Stargazers

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

Watchers

 avatar

tg-search-bot's Issues

docker pip error

image

 > [4/4] RUN pip3 install -U -r requirements.txt:                                                                                                                                                                                                                                                                              
#0 2.546 Collecting Jvav==1.4.1                                                                                                                                                                                                                                                                                                
#0 2.921   Downloading Jvav-1.4.1-py3-none-any.whl (29 kB)                                                                                                                                                                                                                                                                     
#0 2.954 Collecting langdetect==1.0.9                                                                                                                                                                                                                                                                                          
#0 2.964   Downloading langdetect-1.0.9.tar.gz (981 kB)                                                                                                                                                                                                                                                                        
#0 3.022      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 981.5/981.5 kB 18.1 MB/s eta 0:00:00
#0 3.070   Preparing metadata (setup.py): started
#0 3.649   Preparing metadata (setup.py): finished with status 'done'
#0 3.994 Collecting Pyrogram==2.0.92
#0 4.239   Downloading Pyrogram-2.0.92-py3-none-any.whl (3.4 MB)
#0 6.589      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 1.5 MB/s eta 0:00:00
#0 6.881 Collecting pyTelegramBotAPI==4.13.0
#0 6.891   Downloading pyTelegramBotAPI-4.13.0.tar.gz (232 kB)
#0 6.901      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 232.8/232.8 kB 34.1 MB/s eta 0:00:00
#0 6.926   Preparing metadata (setup.py): started
#0 7.206   Preparing metadata (setup.py): finished with status 'done'
#0 7.219 ERROR: Cannot install pyTelegramBotAPI==4.13.0 and pyTelegramBotAPI==4.14.0 because these package versions have conflicting dependencies.
#0 7.220 
#0 7.220 The conflict is caused by:
#0 7.220     The user requested pyTelegramBotAPI==4.13.0
#0 7.220     The user requested pyTelegramBotAPI==4.14.0

redis应该怎么设置?


ERROR: 无法连接到 redis 服务: 127.0.0.1:6379 : Error 111 connecting to 127.0.0.1:6379. Connection refused.

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.