Giter VIP home page Giter VIP logo

searchx's Introduction

SearchX

SearchX

SearchX is a multipurpose Telegram bot written in Python for Google Drive

Features

  • Search data in Google Drive
  • Clone data from Google Drive and GDToT
  • Compress data from Google Drive and GDToT
  • Extract data from Google Drive and GDToT
  • Count data from Google Drive
  • Generate mediainfo of media files from Google Drive and URL
  • Generate frames of media files from Google Drive and URL
  • Generate collage of media files from Google Drive and URL
  • Delete data from Google Drive
  • Set data permission in Google Drive
  • Size Limit support for Clone, Compression and Extraction tasks
  • Destination change support for Clone tasks
  • MongoDB database support
  • Bookmark support for storing Destination Drive IDs into database
  • Support for storing the list of authorized users into database
  • Index Link support
  • Multi-token telegraph support
  • Multi-page telegraph page results
  • Service Account (SA) support
  • Execute shell commands
  • Evaluate Python expressions
  • Run Python code

Configuration

These four files are required to run the bot

Deployment

These two guides are available to deploy the bot

Commands

This list of commands is supported by the bot

start - Start the bot
find - Search data in Google Drive
clone - Clone data to Google Drive
compress - Compress data to Google Drive
extract - Extract data to Google Drive
count - Count data from Google Drive
minfo - Generate mediainfo of a media file
ss - Generate frames of a media file
col - Generate collage of a media file
cancel - Cancel a task
status - Get status of all tasks
share - Set data permission in Google Drive
del - Delete data from Google Drive
addbm - Add bookmark of a destination drive
rembm - Remove bookmark of a destination drive
bookmarks - Get the list of bookmarked destination drives
auth - Grant authorization of an user
unauth - Revoke authorization of an user
users - Get the list of authorized users
shell - Execute shell commands
eval - Evaluate Python expressions
exec - Execute Python code
clearlocals - Clear the locals
ping - Ping the bot
stats - Get the system statistics
log - Get the log file
restart - Restart the bot
help - Get help

Changelog

Click here to see the list of changes made to the bot

FAQs

Click here to read the answers to some of the most common questions and the problems users come across

Credits

Levi (Maintainer) | Shivam Jha | Sreeraj V R | TheArchivists | Snape | Anas | Yuuki | Hrutvik | SpeedX | Agamya Samuel

searchx's People

Contributors

agamya-samuel avatar anymeofu avatar hankmooody avatar jusidama18 avatar l3v11 avatar tempaccforforking 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

searchx's Issues

List error

When i add folder id from share drive, find command not working,
It says no share drive found,

AttributeError: 'ResumableUploadError' object has no attribute 'replace

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/usr/src/app/bot/helper/download_utils/gd_downloader.py", line 34, in add_gd_download
drive.download(link)
File "/usr/src/app/bot/helper/drive_utils/gdriveTools.py", line 705, in download
self.__listener.onDownloadComplete()
File "/usr/src/app/bot/modules/archive.py", line 127, in onDownloadComplete
drive.upload(up_name)
File "/usr/src/app/bot/helper/drive_utils/gdriveTools.py", line 597, in upload
self.__listener.onUploadError(err)
File "/usr/src/app/bot/modules/archive.py", line 174, in onUploadError
error = error.replace('<', '').replace('>', '')
AttributeError: 'ResumableUploadError' object has no attribute 'replace'

Token.json missing error on VPS

app_1 | 2022-12-21 16:29:27,200 - bot - ERROR - The token.json file is missing
app_1 | 2022-12-21 16:29:27,205 - google.auth._default - WARNING - Authentication failed using Compute Engine authentication due to unavailable metadata server.
app_1 | 2022-12-21 16:29:27,206 - telegram.ext.dispatcher - ERROR - No error handlers are registered, logging exception.
app_1 | Traceback (most recent call last):
app_1 | File "/usr/local/lib/python3.8/dist-packages/telegram/ext/utils/promise.py", line 96, in run
app_1 | self._result = self.pooled_function(*self.args, **self.kwargs)
app_1 | File "/usr/src/app/bot/modules/list.py", line 20, in list_drive
app_1 | gd = GoogleDriveHelper()
app_1 | File "/usr/src/app/bot/helper/drive_utils/gdriveTools.py", line 68, in init
app_1 | self.__service = self.__authorize()
app_1 | File "/usr/src/app/bot/helper/drive_utils/gdriveTools.py", line 104, in __authorize
app_1 | return build('drive', 'v3', credentials=creds, cache_discovery=False)
app_1 | File "/usr/local/lib/python3.8/dist-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
app_1 | return wrapped(*args, **kwargs)
app_1 | File "/usr/local/lib/python3.8/dist-packages/googleapiclient/discovery.py", line 298, in build
app_1 | service = build_from_document(
app_1 | File "/usr/local/lib/python3.8/dist-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
app_1 | return wrapped(*args, **kwargs)
app_1 | File "/usr/local/lib/python3.8/dist-packages/googleapiclient/discovery.py", line 580, in build_from_document
app_1 | credentials = _auth.default_credentials(
app_1 | File "/usr/local/lib/python3.8/dist-packages/googleapiclient/_auth.py", line 57, in default_credentials
app_1 | credentials, _ = google.auth.default(
app_1 | File "/usr/local/lib/python3.8/dist-packages/google/auth/_default.py", line 653, in default
app_1 | raise exceptions.DefaultCredentialsError(_HELP_MESSAGE)
app_1 | google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS or explicitly create credentials and re-run the application. For more information, please see https://cloud.google.com/docs/authentication/getting-started

I'm getting this error, I'm hosting it on VPS. Bot is starting but throwing this error if I try to find something.

token.json file is present in directory as well as in config.

TELEGRAPH_ACCS

What is TELEGRAPH_ACCS can ypu please explain and how to get it.

Feature Request

Add /unzipmirror command to unzip/extract .zip, .rar or other compressed files directly from drive link , gdtot links, etc.

Question Not an issue "query/doubt"

This is the directory in the container right ?

WORKDIR /usr/src/app

and in config

DOWNLOAD_DIR=

as well I have to set it to /usr/src/app and if i run multiple instance of this bot on vps it wont cause isse as the volumes are mapped inside container and outside they arent mapped to /usr/src/app

This is what I thought that for every app in Dockerfile and on config I should set it up to /usr/src/app1 ..2 ..3 and so on

which I shouldn't right for every deployment if I keep DOWNLOAD_DIR & Dockerfile work directory to /usr/src/app it should work fine Right ??

I want to run 4 bots on 1 vps what's the best way to do that I mean what DOWNLOAD_DIR should I set ?

error when running gen_token.py

Traceback (most recent call last):
File "/home/.local/lib/python3.7/site-packages/google/auth/transport/requests.py", line 26, in
import requests
File "/usr/lib/python3/dist-packages/requests/init.py", line 43, in
import urllib3
File "/usr/lib/python3/dist-packages/urllib3/init.py", line 8, in
from .connectionpool import (
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 28, in
from six.moves import queue
File "/usr/lib/python3/dist-packages/six.py", line 92, in get
result = self._resolve()
File "/usr/lib/python3/dist-packages/six.py", line 115, in _resolve
return _import_module(self.mod)
File "/usr/lib/python3/dist-packages/six.py", line 82, in _import_module
import(name)
File "/usr/lib/python3.7/queue.py", line 3, in
import threading
File "/usr/lib/python3.7/threading.py", line 8, in
from traceback import format_exc as _format_exc
ImportError: cannot import name 'format_exc' from 'traceback' (/usr/lib/python3.7/traceback.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "gen_token.py", line 4, in
from google.auth.transport.requests import Request
File "/home/.local/lib/python3.7/site-packages/google/auth/init.py", line 17, in
import logging
File "/usr/lib/python3.7/logging/init.py", line 26, in
import sys, os, time, io, traceback, warnings, weakref, collections.abc
File "/usr/lib/python3.7/traceback.py", line 5, in
import linecache
File "/usr/lib/python3.7/linecache.py", line 11, in
import tokenize
File "/usr/lib/python3.7/tokenize.py", line 35, in
from token import *
File "/gen_token.py", line 4, in
from google.auth.transport.requests import Request
File "/home/.local/lib/python3.7/site-packages/google/auth/transport/requests.py", line 35, in
caught_exc,
File "", line 3, in raise_from
ImportError: The requests library is not installed, please install the requests package to use the requests transport.

i already have requests installed with pip3 install requests

APPDRIVE details in config.env

How to fill below details in config.env if we using google+ login in appdrive?

APPDRIVE_EMAIL=
APPDRIVE_PASS=

As its a google+ login, we have to fill google login password?

No Green Padlock

Screenshot_2022-04-13-14-50-51-973_mark via gp
Hi I'm trying generate XSRF_TOKEN, but i can't find Green Padlock

Not a issue but a How-to-query

Is there a way to make a key-value pair for the destination id and save them in some file instead of typing the whole id again n again, for eg :
/clone link Movies

Request

Please add multi clone support
I.e.
clone
Drive/gdtot link 1
Drive/gdtot link 2
...

Thanks in advance

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.