spechide / anydlbot Goto Github PK
View Code? Open in Web Editor NEWAn Open Source GPLv3 All-In-One Telegram Bot
Home Page: https://telegram.dog/AnyDLBot
License: GNU General Public License v3.0
An Open Source GPLv3 All-In-One Telegram Bot
Home Page: https://telegram.dog/AnyDLBot
License: GNU General Public License v3.0
πππ
πππ
πππ
Hi.
I have just setup Tguploader , in ubuntu server. And i defined auth users in config.py. the problem is : every body can use the bot not only auth users. How can i limit access just to auth users.?
I ran this script on herku too but it does not work again
Custom Thumbnail not working in new version of source...
for each photo i send to bot it only set Default (https://via.placeholder.com/90x90)...
(VENV) sh-5.0# python bot.py
2019-09-19 15:49:18,423 - pyrogram.crypto.aes - WARNING - TgCrypto is missing! Pyrogram will work the same, but at a much slower speed. More info: https://docs.pyrogram.org/topics/tgcrypto
2019-09-19 15:49:18,547 - asyncio - DEBUG - Using selector: EpollSelector
2019-09-19 15:49:19,562 - pyrogram.client.client - WARNING - [AnyDLBot] Successfully loaded 24 plugins from "plugins"
Pyrogram v0.15.1-asyncio, Copyright (C) 2017-2019 Dan <https://github.com/delivrance>
Licensed under the terms of the GNU Lesser General Public License v3 or later (LGPLv3+)
2019-09-19 15:49:30,204 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): chatbase.com:443
2019-09-19 15:49:30,724 - urllib3.connectionpool - DEBUG - https://chatbase.com:443 "POST /api/message HTTP/1.1" 200 44
2019-09-19 15:49:30,726 - plugins._core - INFO - {
"_": "pyrogram.User",
"id": 169131815,
"is_self": false,
"is_contact": false,
"is_mutual_contact": false,
"is_deleted": false,
"is_bot": false,
"is_verified": false,
"is_restricted": false,
"is_scam": false,
"is_support": false,
"first_name": "FIRSTNAME",
"status": {
"_": "pyrogram.UserStatus",
"user_id": 169131815,
"recently": true
},
"username": "USERNAME",
"language_code": "en"
}
2019-09-19 15:49:30,727 - plugins._core - INFO - https://www.youtube.com/watch?v=2cT6ULpScZA
2019-09-19 15:49:30,727 - plugins._core - INFO - video.mp4
2019-09-19 15:49:30,727 - plugins._core - INFO - ['youtube-dl', '--no-warnings', '--youtube-skip-dash-manifest', '-j', 'https://www.youtube.com/watch?v=2cT6ULpScZA']
2019-09-19 15:49:33,340 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): i.ytimg.com:443
2019-09-19 15:49:33,569 - urllib3.connectionpool - DEBUG - https://i.ytimg.com:443 "GET /vi/2cT6ULpScZA/maxresdefault.jpg HTTP/1.1" 200 148121
/root/AnyDLBot/plugins/_core.py:224: RuntimeWarning: coroutine 'SendMessage.send_message' was never awaited
reply_to_message_id=update.message_id
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
2019-09-19 15:49:33,652 - pyrogram.client.ext.dispatcher - ERROR - object NoneType can't be used in 'await' expression
Traceback (most recent call last):
File "/root/AnyDLBot/VENV/lib/python3.7/site-packages/pyrogram/client/ext/dispatcher.py", line 183, in update_worker
await handler.callback(self.client, *args)
TypeError: object NoneType can't be used in 'await' expression
I don't understand whats going on here
using Arch Linux with Python 3.7.4
https://i.imgur.com/9bI8kj7.jpg
as the image shows i want to implement these commands in my bot what command do i use in botfather
Converttovideo not uploading bigger files. it shows download successfully
2019-07-27 09:07:31,060 - plugins._core - INFO - http://filimci.xiptv.org:8080/movie/O32nnjde4Fc4/RilWFbJdoR/2884.m
kv
2019-07-27 09:07:31,060 - plugins._core - INFO - twd_s9_e12.mp4
2019-07-27 09:07:31,061 - plugins._core - INFO - ['youtube-dl', '--no-warnings', '--youtube-skip-dash-manifest', '-
j', 'http://filimci.xiptv.org:8080/movie/O32nnjde4Fc4/RilWFbJdoR/2884.mkv']
2019-07-27 09:07:32,959 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): placehold.it:443
2019-07-27 09:07:33,454 - urllib3.connectionpool - DEBUG - https://placehold.it:443 "GET /90x90 HTTP/1.1" 200 276
2019-07-27 09:07:33,457 - pyrogram.client.ext.dispatcher - ERROR - module 'pyrogram' has no attribute 'ParseMode'
Traceback (most recent call last):
File "/root/AnyDLBot/VENV/lib/python3.6/site-packages/pyrogram/client/ext/dispatcher.py", line 183, in update_wor
ker
await handler.callback(self.client, *args)
File "/root/AnyDLBot/plugins/_core.py", line 223, in echo
parse_mode=pyrogram.ParseMode.HTML,
AttributeError: module 'pyrogram' has no attribute 'ParseMode'
Latest Update Has Bug. These Commands Are Not Workingππ»
/getlink
/converttoaudio
/converttovideo
/rename
/ffmpegrobot
/trim
/downloadmedia
/storageinfo
/clearffmpegmedia
/generatecustomthumbnail
/generatescss
docker support???
after making changes in the code when i deploy the bot to heroku it doesnt show me anything
deployed the bot from scratch and this is what I got
2019-07-29T10:47:53.904313+00:00 app[worker.1]: from pydrive.drive import GoogleDrive 2019-07-29T10:47:53.904348+00:00 app[worker.1]: ModuleNotFoundError: No module named 'pydrive' 2019-07-29T10:47:54.063492+00:00 heroku[worker.1]: State changed from up to crashed 2019-07-29T10:47:54.046423+00:00 heroku[worker.1]: Process exited with status 1
heroku button doesn't work
When try to download a video from https://youtu.be/zJH9mLteskE it shows
no-one gonna help you
YouTubeDL said: ERROR: Unable to download webpage: (caused by URLError(RemoteDisconnected('Remote end closed connection without response')))
and same error occurred when tries to upload files from direct link
improve #72 with ENV vars
You could implement those little features as a suggestion to the project :)
Heroku suspended the applet because of p2p...
Maybe some workaround?
The applet violates Heroku's AUP(https://www.heroku.com/policy/aup) by using our services in connection with peer-to-peer file sharing. It is policy 17 under Prohibited Actions.
Add Screenshot Thumbnail Support Like PublicLeech Has, When YouTube-DL Was Unable to Get Thumbnail Of Video, It Shows 90x90 Image Not Thumbail, But PublicLeech Is Showing Thumbnail Of The Same Video.
Please remove _ instead of . And showing %20 instead of space
By this error filename is changed and we can't give the desired filename
Since it is not a client side issue. If file name has more than 64 characters Telegram reduces the length to 64 characters and replaces spaces with _
Then alert the users with the current number of characters and it allows only 64 characters
could be added https://b-ok.cc and https://libgen.io download integration
I am given that error:
something is wrong with the URL you gave me π€¦ββοΈ. If you think this could be a bug please report on ERROR: Unable to download webpage: HTTP Error 503: Service Temporarily Unavailable (caused by <HTTPError 503: 'Service Temporarily Unavailable'>);
but @roanuedhuru_bot can be downloadable file that sites..
Can't upload from URL
https://files.winten.tk/programs/7z1805-x64.exe
Here is the log:
2019-08-22T01:39:49.987266+00:00 app[worker.1]: 2019-08-22 01:39:49,987 - plugins._core - INFO - ['youtube-dl', '--no-warnings', '--youtube-skip-dash-manifest', '-j', 'https://files.winten.tk/programs/7z1805-x64.exe']
2019-08-22T01:39:53.001318+00:00 app[worker.1]: Traceback (most recent call last):
2019-08-22T01:39:53.001321+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/pyrogram/client/ext/dispatcher.py", line 183, in update_worker
2019-08-22T01:39:53.001323+00:00 app[worker.1]: await handler.callback(self.client, *args)
2019-08-22T01:39:53.001325+00:00 app[worker.1]: File "/app/plugins/_core.py", line 217, in echo
2019-08-22T01:39:53.001328+00:00 app[worker.1]: update.chat.id
2019-08-22T01:39:53.001330+00:00 app[worker.1]: File "/app/helper_funcs/help_uploadbot.py", line 23, in DownLoadFile
2019-08-22T01:39:53.001332+00:00 app[worker.1]: r = requests.get(url, allow_redirects=True, stream=True)
2019-08-22T01:39:53.001338+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/requests/api.py", line 75, in get
2019-08-22T01:39:53.001341+00:00 app[worker.1]: return request('get', url, params=params, **kwargs)
2019-08-22T01:39:53.001343+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/requests/api.py", line 60, in request
2019-08-22T01:39:53.001345+00:00 app[worker.1]: return session.request(method=method, url=url, **kwargs)
2019-08-22T01:39:53.001347+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/requests/sessions.py", line 519, in request
2019-08-22T01:39:53.001349+00:00 app[worker.1]: prep = self.prepare_request(req)
2019-08-22T01:39:53.001351+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/requests/sessions.py", line 462, in prepare_request
2019-08-22T01:39:53.001353+00:00 app[worker.1]: hooks=merge_hooks(request.hooks, self.hooks),
2019-08-22T01:39:53.001355+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/requests/models.py", line 313, in prepare
2019-08-22T01:39:53.001357+00:00 app[worker.1]: self.prepare_url(url, params)
2019-08-22T01:39:53.001360+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/requests/models.py", line 387, in prepare_url
2019-08-22T01:39:53.001362+00:00 app[worker.1]: raise MissingSchema(error)
2019-08-22T01:39:53.001364+00:00 app[worker.1]: requests.exceptions.MissingSchema: Invalid URL '': No schema supplied. Perhaps you meant http://?```
Bot Responds To Normal Commands Like /Start or /me but when it comes to links, (I had tried various links, it gives error on all of them) it doesn't responds and when I check the log, it shows me this
Here is the log:
2019-07-29T18:06:25.956871+00:00 app[worker.1]: 2019-07-29 18:06:25,956 - plugins._core - INFO - ['youtube-dl', '--no-warnings', '--youtube-skip-dash-manifest', '-j', 'https://vipkhan.mobi/cache/CAT_punjabi-videos/CAT_punjabi-video-song/4375/mp4/mp4-1080p/Ja%20Ve%20Ja%20Parmish%20Verma%20G%20Sidhu%20-%20HDYaar.Com.mp4'] 2019-07-29T18:06:29.397964+00:00 app[worker.1]: 2019-07-29 18:06:29,397 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): placehold.it:443 2019-07-29T18:06:29.571628+00:00 app[worker.1]: 2019-07-29 18:06:29,570 - urllib3.connectionpool - DEBUG - https://placehold.it:443 "GET /90x90 HTTP/1.1" 200 276 2019-07-29T18:06:29.614825+00:00 app[worker.1]: 2019-07-29 18:06:29,600 - pyrogram.client.ext.dispatcher - ERROR - module 'pyrogram' has no attribute 'ParseMode' 2019-07-29T18:06:29.614871+00:00 app[worker.1]: Traceback (most recent call last): 2019-07-29T18:06:29.615124+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/pyrogram/client/ext/dispatcher.py", line 180, in update_worker 2019-07-29T18:06:29.615128+00:00 app[worker.1]: handler.callback(self.client, *args) 2019-07-29T18:06:29.615131+00:00 app[worker.1]: File "/app/plugins/_core.py", line 223, in echo 2019-07-29T18:06:29.615133+00:00 app[worker.1]: parse_mode=pyrogram.ParseMode.HTML, 2019-07-29T18:06:29.615201+00:00 app[worker.1]: AttributeError: module 'pyrogram' has no attribute 'ParseMode'
Also,
It asks me to upgrade my subscription even when I'm the auth user.
Kindly Look Into This
This is the error i get everytime when I deploy the app on heroku
Build succeeded 2019-07-29T06:37:49.427456+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=uploadertg.herokuapp.com request_id=6e22bdac-0414-45a8-9d7b-de62eb11894d fwd="139.167.170.130" dyno= connect= service= status=503 bytes= protocol=https 2019-07-29T06:37:50.277943+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=uploadertg.herokuapp.com request_id=78fd6231-db2d-41d8-9c06-0e3515c057e3 fwd="139.167.170.130" dyno= connect= service= status=503 bytes= protocol=https
If file name has more than 64 characters Telegram reduces the length to 64 characters and replaces spaces with _
Then alert the users with you have entered %d characters and it allows only 64 characters . Reduce the number of characters in the Filename
All are fine. but when selecting the required format, the following errors occurs . Plz fix..
await handler.callback(self.client, *args)
File "/app/plugins/cb_buttons.py", line 38, in button
await youtube_dl_call_back(bot, update)
File "/app/plugins/youtube_dl_button.py", line 182, in youtube_dl_call_back
download_directory_contents = os.path.listdir(download_directory_dirname)
AttributeError: module 'posixpath' has no attribute 'listdir'
Sir, please add the tutorial video
Could you list all the commands that the bot can execute so that I configure them with botfather? Thanks in advance! Also, I think it would be nice to add them to the readme to avoid similar issues.
Please change get link in http://upindia.mobi/ or https://openload.cc/
2fa1b077559a62208543c09abfcba733fdac0d99
81
Yesterday i hosted this bot on heroku,
Everthing was working Fine, Unitl today it got stucked at trying to download, while downloading files from youtube or other sites suddenly,
Here are the logs,
Make this bot able to upload Files from Torrent too will be helpful
The /unzip command is not working. π
Sometimes it only Downloading large files of 1.4GB etc and it is not Uploading to Telegram and Shows Download Completed only and can't get the file on telegram
2019-10-21T07:29:34.098311+00:00 app[worker.1]: 2019-10-21 07:29:34,092 - pyrogram.client.ext.dispatcher - ERROR - module 'asyncio' has no attribute 'TimeOutError'
2019-10-21T07:29:34.098333+00:00 app[worker.1]: Traceback (most recent call last):
2019-10-21T07:29:34.098337+00:00 app[worker.1]: File "/app/plugins/dl_button.py", line 99, in ddl_call_back
2019-10-21T07:29:34.09834+00:00 app[worker.1]: c_time
2019-10-21T07:29:34.098344+00:00 app[worker.1]: File "/app/plugins/dl_button.py", line 264, in download_coroutine
2019-10-21T07:29:34.098346+00:00 app[worker.1]: total_length = int(response.headers["Content-Length"])
2019-10-21T07:29:34.098348+00:00 app[worker.1]: File "multidict/_multidict.pyx", line 62, in multidict._multidict._Base.getitem
2019-10-21T07:29:34.09835+00:00 app[worker.1]: File "multidict/_multidict.pyx", line 57, in multidict._multidict._Base._getone
2019-10-21T07:29:34.098352+00:00 app[worker.1]: File "multidict/_multidict.pyx", line 52, in multidict._multidict._Base._getone
2019-10-21T07:29:34.098356+00:00 app[worker.1]: KeyError: 'Content-Length'
2019-10-21T07:29:34.098358+00:00 app[worker.1]:
2019-10-21T07:29:34.09836+00:00 app[worker.1]: During handling of the above exception, another exception occurred:
2019-10-21T07:29:34.098361+00:00 app[worker.1]:
2019-10-21T07:29:34.098363+00:00 app[worker.1]: Traceback (most recent call last):
2019-10-21T07:29:34.098366+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/pyrogram/client/ext/dispatcher.py", line 198, in update_worker
2019-10-21T07:29:34.098368+00:00 app[worker.1]: await handler.callback(self.client, *args)
2019-10-21T07:29:34.09837+00:00 app[worker.1]: File "/app/plugins/cb_buttons.py", line 135, in button
2019-10-21T07:29:34.098371+00:00 app[worker.1]: await ddl_call_back(bot, update)
2019-10-21T07:29:34.098374+00:00 app[worker.1]: File "/app/plugins/dl_button.py", line 101, in ddl_call_back
2019-10-21T07:29:34.098376+00:00 app[worker.1]: except asyncio.TimeOutError:
2019-10-21T07:29:34.098378+00:00 app[worker.1]: AttributeError: module 'asyncio' has no attribute 'TimeOutError'
2019-10-21T07:29:34.10294+00:00 app[worker.1]: 2019-10-21 07:29:34,102 - asyncio - ERROR - SSL error in data received
2019-10-21T07:29:34.102943+00:00 app[worker.1]: protocol: <asyncio.sslproto.SSLProtocol object at 0x7f6e2ede1358>
2019-10-21T07:29:34.102946+00:00 app[worker.1]: transport: <_SelectorSocketTransport fd=13 read=polling write=<idle, bufsize=0>>
2019-10-21T07:29:34.102948+00:00 app[worker.1]: Traceback (most recent call last):
2019-10-21T07:29:34.10295+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
2019-10-21T07:29:34.102952+00:00 app[worker.1]: ssldata, appdata = self._sslpipe.feed_ssldata(data)
2019-10-21T07:29:34.102955+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/asyncio/sslproto.py", line 207, in feed_ssldata
2019-10-21T07:29:34.102957+00:00 app[worker.1]: self._sslobj.unwrap()
2019-10-21T07:29:34.102959+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/ssl.py", line 767, in unwrap
2019-10-21T07:29:34.102961+00:00 app[worker.1]: return self._sslobj.shutdown()
2019-10-21T07:29:34.102963+00:00 app[worker.1]: ssl.SSLError: [SSL: KRB5_S_INIT] application data after close notify (_ssl.c:2605)
`2019-08-03T13:07:17.467208+00:00 app[worker.1]: await callback(event)
2019-08-03T13:07:17.467209+00:00 app[worker.1]: File "stdplugins/markdown.py", line 136, in reparse
2019-08-03T13:07:17.467212+00:00 app[worker.1]: message, msg_entities = await borg._parse_message_text(event.raw_text, parser)
2019-08-03T13:07:17.467213+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/telethon/client/messageparse.py", line 86, in _parse_message_text
2019-08-03T13:07:17.467214+00:00 app[worker.1]: message, msg_entities = parse_mode.parse(message)
2019-08-03T13:07:17.467215+00:00 app[worker.1]: File "stdplugins/markdown.py", line 87, in parse
2019-08-03T13:07:17.467217+00:00 app[worker.1]: message = add_surrogate(message)
2019-08-03T13:07:17.467225+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/telethon/helpers.py", line 28, in add_surrogate
2019-08-03T13:07:17.467227+00:00 app[worker.1]: if (0x10000 <= ord(x) <= 0x10FFFF) else x for x in text
2019-08-03T13:07:17.467228+00:00 app[worker.1]: TypeError: 'NoneType' object is not iterable`
'CHAT_BASE_TOKEN' key is missing in app.json file. Plz fix it !
No Malayalam translation in this repo.
at=error code=H14 desc="No web processes running" method=GET path="/" host=linksgenbot.herokuapp.com request_id=162d0e84-be76-4b8b-adc0-afaf0e1defc6 fwd="154.152.129.121" dyno= connect= service= status=503 bytes= protocol=https
2019-08-14T14:27:40.036586+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=linksgenbot.herokuapp.com request_id=b4c71502-8971-42a0-a537-0158cefa5fa6 fwd="154.152.129.121" dyno= connect= service= status=503 bytes= protocol=https
Sometimes fails to download or Upload files or any other similar operations and the Users wants to try it again. Because of the Failure of the Process they have tried give them an another chance without waiting for 1800 seconds only if there is a failure in the Process to make them happy
019-05-16T13:26:39.676414+00:00 app[worker.1]: Traceback (most recent call last):
2019-05-16T13:26:39.676440+00:00 app[worker.1]: File "bot.py", line 15, in
2019-05-16T13:26:39.676541+00:00 app[worker.1]: from sample_config import Config
2019-05-16T13:26:39.676546+00:00 app[worker.1]: File "/app/sample_config.py", line 3, in
2019-05-16T13:26:39.676646+00:00 app[worker.1]: class Config(object):
2019-05-16T13:26:39.676651+00:00 app[worker.1]: File "/app/sample_config.py", line 28, in Config
2019-05-16T13:26:39.676758+00:00 app[worker.1]: CHUNK_SIZE = int(os.environ.get("CHUNK_SIZE", 128))
2019-05-16T13:26:39.676766+00:00 app[worker.1]: ValueError: invalid literal for int() with base 10: ''
Please add openload url support
Heroku is still suspending the app (Reason might be the same as mentioned in #49 )
unzip feature doesnt work :(
I suggest you to check the getlink function and add impot json
There is huge problem with downloading form youtube. Speed is 50kb/sec, when downloading from any site or uploading to telegram is near 10MB/sec. Where can be problem?
need a cloud mail.ru download integration. it would be awesome.!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.