GithubHelp home page GithubHelp logo

hemantapkh / torrenthunt Goto Github PK

View Code? Open in Web Editor NEW
268.0 6.0 120.0 2.27 MB

πŸ΄β€β˜ οΈ The ultimate torrent bot on telegram

Home Page: https://t.me/TorrentHuntBot?start=github

License: MIT License

Python 99.39% Dockerfile 0.49% Procfile 0.05% Shell 0.07%
torrents torrent-bot telegram-torrent 1337x-to telegram-torrent-bot 1337x nyaa-si piratebay rarbg torrent-galaxy

torrenthunt's Introduction

torrenthunt's People

Contributors

dependabot[bot] avatar hemantapkh avatar rinrinx 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  avatar  avatar  avatar  avatar  avatar

torrenthunt's Issues

(__init__.py:663 MainThread) ERROR

(init.py:663 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: query is too old and response timeout expired or query ID is invalid"

How to fix thisπŸ˜“?

Invalid first argument to `register()`

I am using Python 3.10.5

After following all the steps, when I try to run following

python torrenthunt.py

I am getting an below error

TypeError: Invalid first argument to register(). ForwardRef('CachedResponse') is not a class.

Entire stacktrace is below

`(env) ➜ torrenthunt git:(main) βœ— python torrenthunt.py
Traceback (most recent call last):
File "/Users/amit/torrenthunt/torrenthunt.py", line 5, in

from src import *

File "/Users/amit/torrenthunt/src/init.py", line 2, in

from src.objs import config, dbSql

File "/Users/amit/torrenthunt/src/objs.py", line 5, in

import telebot, py1337x

File "/Users/amit/env/lib/python3.10/site-packages/py1337x/init.py", line 1, in

from py1337x.py1337x import py1337x

File "/Users/amit/env/lib/python3.10/site-packages/py1337x/py1337x.py", line 2, in

import requests_cache

File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/init.py", line 43, in

from .backends import *

File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/backends/init.py", line 8, in

from .base import BaseCache, BaseStorage

File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/backends/base.py", line 18, in

from ..serializers import init_serializer

File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/serializers/init.py", line 6, in

from .preconf import (

File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/serializers/preconf.py", line 26, in

base_stage = CattrStage()  #: Base stage for all serializer pipelines

File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/serializers/cattrs.py", line 32, in init

self.converter = init_converter(factory)

File "/Users/amit/env/lib/python3.10/site-packages/requests_cache/serializers/cattrs.py", line 67, in init_converter
converter.register_structure_hook(
File "/Users/amit/env/lib/python3.10/site-packages/cattr/converters.py", line 263, in register_structure_hook
self._structure_func.register_cls_list([(cl, func)])

File "/Users/amit/env/lib/python3.10/site-packages/cattr/dispatch.py", line 57, in register_cls_list
self._single_dispatch.register(cls, handler)

File "/opt/homebrew/Cellar/[email protected]/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/functools.py", line 856, in register
raise TypeError(
TypeError: Invalid first argument to register(). ForwardRef('CachedResponse') is not a class.`

Please help me if possible, how to get rid of this.

Traceback error

recently i have been only trying and trying to deploy this torrent search bot on my vps and ultimately caught with this error:
Traceback (most recent call last):
File "torrenthunt.py", line 5, in
from src import *
File "/home/ubuntu/torrenthunt/src/init.py", line 2, in
from src.objs import config, dbSql
File "/home/ubuntu/torrenthunt/src/objs.py", line 12, in
config = json.load(open(configPath))
File "/usr/lib/python3.8/json/init.py", line 293, in load
return loads(fp.read(),
File "/usr/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 2 column 27 (char 28)

Add torrent sites

Can an adult torrent site be added? or add it myself (requires method)

How to deploy as a docker container ?

hey there , i am new to programming in general and i was wondering how can i deploy this as a docker container . i tried to deploy on heroku by creating a dokerfile and built an image .But when i ran the container i got the following error :

Traceback (most recent call last): File "/app/torrenthunt.py", line 86, in <module> bot.polling(none_stop=True) File "/usr/local/lib/python3.10/site-packages/telebot/__init__.py", line 633, in polling self.__threaded_polling(non_stop, interval, timeout, long_polling_timeout, allowed_updates) File "/usr/local/lib/python3.10/site-packages/telebot/__init__.py", line 692, in __threaded_polling raise e File "/usr/local/lib/python3.10/site-packages/telebot/__init__.py", line 655, in __threaded_polling self.worker_pool.raise_exceptions() File "/usr/local/lib/python3.10/site-packages/telebot/util.py", line 130, in raise_exceptions raise self.exception_info File "/usr/local/lib/python3.10/site-packages/telebot/util.py", line 82, in run task(*args, **kwargs) File "/app/src/commands/start.py", line 10, in start if dbSql.setAccount(message.chat.id, message.chat.username): File "/app/models.py", line 16, in setAccount isRegistered = self.isRegistered(userId, chatType) File "/app/models.py", line 37, in isRegistered isRegistered = cur.execute(f'SELECT * FROM {chatType} WHERE userId={userId}').fetchone() sqlite3.OperationalError: no such table: users

it seems that the sqlite db is not being created properly or it is not created at all . i dont know for sure as i dont know much about python and databases . if you can help me out with this , that would be great .

anyways great work brother and i hope you will continue bringing us great projects like this in future also .

getting error

I am getting the the following error

 pyrogram.errors.exceptions.flood_420.FloodWait: Telegram says: [420 FLOOD_WAIT_X] - A wait of 3135 seconds is required (caused by "auth.ImportBotAuthorization")

TypeError: gather() got an unexpected keyword argument 'loop'

/home/ubuntu/TorrentHunt/torrenthunt.py:95: DeprecationWarning: ssl.PROTOCOL_TLSv1_2 is deprecated
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
Traceback (most recent call last):
File "/home/ubuntu/TorrentHunt/env/lib/python3.10/site-packages/aiohttp/web.py", line 508, in run_app
loop.run_until_complete(main_task)
File "/usr/lib/python3.10/asyncio/base_events.py", line
646, in run_until_complete
return future.result()
File "/home/ubuntu/TorrentHunt/env/lib/python3.10/site-packages/aiohttp/web.py", line 411, in _run_app
await site.start()
File "/home/ubuntu/TorrentHunt/env/lib/python3.10/site-packages/aiohttp/web_runner.py", line 121, in start
self._server = await loop.create_server(
File "/usr/lib/python3.10/asyncio/base_events.py", line
1505, in create_server
raise OSError(err.errno, 'error while attempting '
OSError: [Errno 99] error while attempting to bind on address ('129.146.253.192', 80): cannot assign requested address
During handling of the above exception, another exception
occurred:
Traceback (most recent call last):
File "/home/ubuntu/TorrentHunt/torrenthunt.py", line 99, in
web.run_app(
File "/home/ubuntu/TorrentHunt/env/lib/python3.10/site-packages/aiohttp/web.py", line 512, in run_app
_cancel_tasks({main_task}, loop)
File "/home/ubuntu/TorrentHunt/env/lib/python3.10/site-packages/aiohttp/web.py", line 444, in _cancel_tasks
asyncio.gather(*to_cancel, loop=loop, return_exceptions=True)
TypeError: gather() got an unexpected keyword argument 'loop'

Anyway to fix it

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.