xmysterlousx / mega-link-downloader-bot Goto Github PK
View Code? Open in Web Editor NEWA telegram bot to download mega.nz links. (made with pyrogram).
License: GNU General Public License v3.0
A telegram bot to download mega.nz links. (made with pyrogram).
License: GNU General Public License v3.0
Cant access otp
2022-06-24T14:04:14.075628+00:00 app[worker.1]: FileNotFoundError: [Errno 2] No such file or directory: 'mega-speedlimit'
Cos need paralel downloads for mega, in ttk no possible
Hello, you've done a great job in creating this bot. I'm trying to make it work but I'm getting the following, can you please help me?
2021-08-25 20:04:49,289 - pyrogram.crypto.aes - INFO - Using TgCrypto
2021-08-25 20:04:49,327 - asyncio - DEBUG - Using selector: EpollSelector
2021-08-25 20:04:51,512 - mega.mega - INFO - Logging in anonymous temporary user...
2021-08-25 20:04:51,515 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): g.api.mega.co.nz:443
2021-08-25 20:04:51,731 - urllib3.connectionpool - DEBUG - https://g.api.mega.co.nz:443 "POST /cs?id=1053145795 HTTP/1.1" 200 15
2021-08-25 20:04:51,734 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): g.api.mega.co.nz:443
2021-08-25 20:04:52,111 - urllib3.connectionpool - DEBUG - https://g.api.mega.co.nz:443 "POST /cs?id=1053145796 HTTP/1.1" 200 126
2021-08-25 20:04:52,113 - mega.mega - INFO - Getting all files...
2021-08-25 20:04:52,115 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): g.api.mega.co.nz:443
2021-08-25 20:04:52,559 - urllib3.connectionpool - DEBUG - https://g.api.mega.co.nz:443 "POST /cs?id=1053145797&sid=0JXsYNCV7GDQlexg0JXsYFJVMnpXNktrRDdz9D-1RHf-v-YuMfAR8QifRA HTTP/1.1" 200 441
2021-08-25 20:04:52,561 - mega.mega - INFO - Login complete
2021-08-25 20:04:52,561 - plugins.mega_logging - INFO - expected str, bytes or os.PathLike object, not NoneType
2021-08-25 20:04:52,561 - mega.mega - INFO - Logging in anonymous temporary user...
2021-08-25 20:04:52,563 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): g.api.mega.co.nz:443
2021-08-25 20:04:52,793 - urllib3.connectionpool - DEBUG - https://g.api.mega.co.nz:443 "POST /cs?id=1053145798&sid=0JXsYNCV7GDQlexg0JXsYFJVMnpXNktrRDdz9D-1RHf-v-YuMfAR8QifRA HTTP/1.1" 200 5
Pyrogram v1.2.9, Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
Licensed under the terms of the GNU Lesser General Public License v3 or later (LGPLv3+)
Traceback (most recent call last):
File "/root/mega-link-downloader-bot/plugins/mega_logging.py", line 34, in <module>
logging_in_megacmd = subprocess.run(["mega-login", email, password]) # Logging into MEGAcmd (Helps to bypass quota limits if you use a pro/business account)
File "/usr/lib/python3.8/subprocess.py", line 493, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1639, in _execute_child
self.pid = _posixsubprocess.fork_exec(
TypeError: expected str, bytes or os.PathLike object, not NoneType
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "bot.py", line 35, in <module>
app.run()
File "/usr/local/lib/python3.8/dist-packages/pyrogram/methods/utilities/run.py", line 61, in run
self.start()
File "/usr/local/lib/python3.8/dist-packages/pyrogram/sync.py", line 56, in async_to_sync_wrap
return loop.run_until_complete(coroutine)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/local/lib/python3.8/dist-packages/pyrogram/methods/utilities/start.py", line 68, in start
await self.initialize()
File "/usr/local/lib/python3.8/dist-packages/pyrogram/methods/auth/initialize.py", line 44, in initialize
self.load_plugins()
File "/usr/local/lib/python3.8/dist-packages/pyrogram/client.py", line 715, in load_plugins
module = import_module(module_path)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/root/mega-link-downloader-bot/plugins/mega_logging.py", line 38, in <module>
m = mega.login()
File "/usr/local/lib/python3.8/dist-packages/mega/mega.py", line 52, in login
self.login_anonymous()
File "/usr/local/lib/python3.8/dist-packages/mega/mega.py", line 89, in login_anonymous
user = self._api_request({
File "/usr/local/lib/python3.8/dist-packages/tenacity/__init__.py", line 293, in wrapped_f
return self.call(f, *args, **kw)
File "/usr/local/lib/python3.8/dist-packages/tenacity/__init__.py", line 359, in call
do = self.iter(retry_state=retry_state)
File "/usr/local/lib/python3.8/dist-packages/tenacity/__init__.py", line 320, in iter
return fut.result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 437, in result
return self.__get_result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/usr/local/lib/python3.8/dist-packages/tenacity/__init__.py", line 362, in call
result = fn(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/mega/mega.py", line 193, in _api_request
raise RequestError(int_resp)
mega.errors.RequestError: EACCESS, Access violation (e.g., trying to write to a read-only share)
It would be nice if you implement google tead drive aka shared drive support, so that files/folders are cloned from mega to gdrive.
please help me sir error on VPS
Error
It's Not Supporting Folder Link Of Mega !
I am not able to find redis values
Hi, In mega-link-downloader-bot, inappropriate dependency versioning constraints can cause risks.
Below are the dependencies and version constraints that the project is using
python-telegram-bot
instaloader
aiohttp
beautifulsoup4
hachoir
numpy
Pillow
git+https://github.com/XMYSTERlOUSX/pyrogram+https://github.com/XMYSTERlOUSX/mega.py
requests
tgcrypto
python-dotenv
redis
psycopg2-binary
feedparser
filesplit
The version constraint == will introduce the risk of dependency conflicts because the scope of dependencies is too strict.
The version constraint No Upper Bound and * will introduce the risk of the missing API Error because the latest version of the dependencies may remove some APIs.
After further analysis, in this project,
The version constraint of dependency Pillow can be changed to ==9.2.0.
The version constraint of dependency Pillow can be changed to >=2.0.0,<=9.1.1.
The version constraint of dependency redis can be changed to >=2.4.10,<=2.10.6.
The above modification suggestions can reduce the dependency conflicts as much as possible,
and introduce the latest version as much as possible without calling Error in the projects.
The invocation of the current project includes all the following methods.
PIL.Image.open
redis.StrictRedis.get redis.StrictRedis
asyncio.create_subprocess_exec update.reply_text os.path.isdir os.path.join fname.split database.blacklist.check_blacklist MSG.copy logging.basicConfig n.append math.ceil get_stuff asyncio.create_subprocess_exec.communicate pyrogram.Client.run os.walk i.str.zfill set pyrogram.filters.regex redis.StrictRedis bot.edit_message_text ast.literal_eval dict database.blacklist.add_blacklist DB.get os.stat shutil.rmtree message.reply_text.delete os.path.exists open os.environ.get.split stderr.decode.strip divmod bot.send_document humanbytes bot.send_video datetime.datetime.now os.makedirs format database.blacklist.get_blacklisted take_screen_shot len hachoir.parser.createParser logging.getLogger.setLevel mega.Mega.login base_name.split helpers.download_uplaod_helper.humanbytes cult_small_video pyrogram.Client lt.append PIL.Image.open.resize pyrogram.Client.on_message database.blacklist.remove_blacklist hachoir.metadata.extractMetadata.get functools.partial message.reply_text message.edit logging.getLogger megalink.strip.strip li.remove time.time Ul.append stderr.decode database.userchats.get_all_chats message.reply_text.edit_text client.download_media mega.Mega pyrogram.idle mega_logging.m.get_public_url_info.split str bool hachoir.metadata.extractMetadata TimeFormatter bot.download_media message.reply_document filesplit.split.Split.split filesplit.split.Split os.environ.get update.reply_chat_action helpers.files_spliiting.split_video_files subprocess.run join os.path.lexists hachoir.metadata.extractMetadata.has asyncio.get_running_loop.run_in_executor helpers.download_uplaod_helper.send_file thumb_image_path.Image.open.convert.save thumb_image_path.Image.open.convert open.write bot.send_message pyrogram.types.InlineKeyboardMarkup get_stuff.remove range config.Config.REDIS_URI.split helpers.download_uplaod_helper.send_splitted_file stdout.decode.strip pyrogram.filters.user math.floor os.remove get_stuff.update round message.text.split nc.copy logging.getLogger.info translation.Translation.AFTER_SUCCESSFUL_UPLOAD_MSG_WITH_TS.format mega_logging.m.get_public_url_info pyrogram.types.InlineKeyboardButton DB.set int stdout.decode redis.StrictRedis.get os.path.getsize database.userchats.add_chat PIL.Image.open pyrogram.filters.command asyncio.get_running_loop
@developer
Could please help me check this issue?
May I pull a request to fix it?
Thank you very much.
while deploying on heroku error occurred which is ( We couldn't deploy your app because the source code violates the Salesforce Acceptable Use and External-Facing Services Policy.)
Fix the issue ASAP
Thank you
robot not working
2021-08-02T04:51:11.001254+00:00 app[worker.1]: download_directory = tmp_directory_for_each_user + "/" + fname
2021-08-02T04:51:11.001256+00:00 app[worker.1]: ^
2021-08-02T04:51:11.001273+00:00 app[worker.1]: SyntaxError: invalid syntax
2021-08-02T04:51:11.118032+00:00 heroku[worker.1]: Process exited with status 1
2021-08-02T04:51:11.175592+00:00 heroku[worker.1]: State changed from up to crashed
2021-08-02T04:51:11.182761+00:00 heroku[worker.1]: State changed from crashed to starting
2021-08-02T04:51:20.876633+00:00 heroku[worker.1]: Starting process with command python3 bot.py
2021-08-02T04:51:21.658079+00:00 heroku[worker.1]: State changed from starting to up
2021-08-02T04:51:24.625573+00:00 app[worker.1]: 2021-08-02 04:51:24,625 - pyrogram.crypto.aes - INFO - Using TgCrypto
2021-08-02T04:51:24.738944+00:00 app[worker.1]: 2021-08-02 04:51:24,738 - asyncio - DEBUG - Using selector: EpollSelector
2021-08-02T04:51:26.482547+00:00 app[worker.1]: Pyrogram v1.2.9, Copyright (C) 2017-2021 Dan https://github.com/delivrance
2021-08-02T04:51:26.482565+00:00 app[worker.1]: Licensed under the terms of the GNU Lesser General Public License v3 or later (LGPLv3+)
2021-08-02T04:51:26.482566+00:00 app[worker.1]:
2021-08-02T04:51:29.844440+00:00 heroku[worker.1]: Process exited with status 1
2021-08-02T04:51:29.662372+00:00 app[worker.1]: Traceback (most recent call last):
2021-08-02T04:51:29.662406+00:00 app[worker.1]: File "/app/bot.py", line 33, in
2021-08-02T04:51:29.662512+00:00 app[worker.1]: app.run()
2021-08-02T04:51:29.662543+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/methods/utilities/run.py", line 61, in run
2021-08-02T04:51:29.662757+00:00 app[worker.1]: self.start()
2021-08-02T04:51:29.662783+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/sync.py", line 56, in async_to_sync_wrap
2021-08-02T04:51:29.662979+00:00 app[worker.1]: return loop.run_until_complete(coroutine)
2021-08-02T04:51:29.663007+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
2021-08-02T04:51:29.663359+00:00 app[worker.1]: return future.result()
2021-08-02T04:51:29.663384+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/methods/utilities/start.py", line 68, in start
2021-08-02T04:51:29.663499+00:00 app[worker.1]: await self.initialize()
2021-08-02T04:51:29.663524+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/methods/auth/initialize.py", line 44, in initialize
2021-08-02T04:51:29.663629+00:00 app[worker.1]: self.load_plugins()
2021-08-02T04:51:29.663652+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/client.py", line 715, in load_plugins
2021-08-02T04:51:29.663902+00:00 app[worker.1]: module = import_module(module_path)
2021-08-02T04:51:29.663906+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/importlib/init.py", line 127, in import_module
2021-08-02T04:51:29.664028+00:00 app[worker.1]: return _bootstrap._gcd_import(name[level:], package, level)
2021-08-02T04:51:29.664048+00:00 app[worker.1]: File "", line 1030, in _gcd_import
2021-08-02T04:51:29.664156+00:00 app[worker.1]: File "", line 1007, in _find_and_load
2021-08-02T04:51:29.664236+00:00 app[worker.1]: File "", line 986, in _find_and_load_unlocked
2021-08-02T04:51:29.664315+00:00 app[worker.1]: File "", line 680, in _load_unlocked
2021-08-02T04:51:29.664395+00:00 app[worker.1]: File "", line 846, in exec_module
2021-08-02T04:51:29.664542+00:00 app[worker.1]: File "", line 983, in get_code
2021-08-02T04:51:29.664695+00:00 app[worker.1]: File "", line 913, in source_to_code
2021-08-02T04:51:29.664837+00:00 app[worker.1]: File "", line 228, in _call_with_frames_removed
2021-08-02T04:51:29.664985+00:00 app[worker.1]: File "/app/plugins/megadl.py", line 156
2021-08-02T04:51:29.665011+00:00 app[worker.1]: download_directory = tmp_directory_for_each_user + "/" + fname
2021-08-02T04:51:29.665033+00:00 app[worker.1]: ^
2021-08-02T04:51:29.665089+00:00 app[worker.1]: SyntaxError: invalid syntax
2021-08-02T04:51:29.924874+00:00 heroku[worker.1]: State changed from up to crashed
ITS NOT. WORKINGS
Application Logs
2022-05-24T06:29:40.802143+00:00 app[worker.1]: File "", line 991, in _find_and_load
2022-05-24T06:29:40.802143+00:00 app[worker.1]: File "", line 975, in _find_and_load_unlocked
2022-05-24T06:29:40.802144+00:00 app[worker.1]: File "", line 671, in _load_unlocked
2022-05-24T06:29:40.802144+00:00 app[worker.1]: File "", line 848, in exec_module
2022-05-24T06:29:40.802144+00:00 app[worker.1]: File "", line 219, in _call_with_frames_removed
2022-05-24T06:29:40.802144+00:00 app[worker.1]: File "/app/plugins/caption.py", line 13, in
2022-05-24T06:29:40.802145+00:00 app[worker.1]: @Client.on_message(filters.reply & filters.text & ~filters.edited & ~filters.group & ~filters.command("deletethumbnail") & ~filters.command("mega_ini"))
2022-05-24T06:29:40.802145+00:00 app[worker.1]: AttributeError: module 'pyrogram.filters' has no attribute 'edited'
2022-05-24T06:29:41.058473+00:00 heroku[worker.1]: Process exited with status 1
2022-05-24T06:29:41.198999+00:00 heroku[worker.1]: State changed from up to crashed
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.