miyukikun / fasttelethonhelper Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
(venv) D:\codesafe\tgindexpro_venv\tg-index>pip install FastTelethonhelper
Collecting FastTelethonhelper
Using cached FastTelethonhelper-1.0.6-py3-none-any.whl (7.3 kB)
Requirement already satisfied: telethon-tgcrypto in d:\codesafe\tgindexpro_venv\tg-index\venv\lib\site-packages (from FastTelethonhelper) (0.0.3)
Requirement already satisfied: telethon in d:\codesafe\tgindexpro_venv\tg-index\venv\lib\site-packages (from FastTelethonhelper) (1.24.0)
Requirement already satisfied: cryptg in d:\codesafe\tgindexpro_venv\tg-index\venv\lib\site-packages (from FastTelethonhelper) (0.3.1)
Collecting pyaesni
Using cached pyaesni-0.16.tar.gz (2.7 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: rsa in d:\codesafe\tgindexpro_venv\tg-index\venv\lib\site-packages (from telethon->FastTelethonhelper) (4.8)
Requirement already satisfied: pyaes in d:\codesafe\tgindexpro_venv\tg-index\venv\lib\site-packages (from telethon->FastTelethonhelper) (1.6.1)
Requirement already satisfied: tgcrypto in d:\codesafe\tgindexpro_venv\tg-index\venv\lib\site-packages (from telethon-tgcrypto->FastTelethonhelper) (1.2.3)
Requirement already satisfied: pyasn1>=0.1.3 in d:\codesafe\tgindexpro_venv\tg-index\venv\lib\site-packages (from rsa->telethon->FastTelethonhelper) (0.4.8)
Using legacy 'setup.py install' for pyaesni, since package 'wheel' is not installed.
Installing collected packages: pyaesni, FastTelethonhelper
Running setup.py install for pyaesni ... error
error: subprocess-exited-with-error
× Running setup.py install for pyaesni did not run successfully.
│ exit code: 1
╰─> [52 lines of output]
running install
running build
running build_ext
Traceback (most recent call last):
File "C:\Users\rayanf\AppData\Local\Temp\pip-install-zy3sege3\pyaesni_25cccf926a904b3da247f50d0acb4fa8\setup.py", line 28, in build_extensions
v = json.loads(subprocess.check_output(['cmake', '-E', 'capabilities']))["version"]
File "C:\Users\rayanf\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Users\rayanf\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\rayanf\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 966, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\rayanf\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1435, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\rayanf\AppData\Local\Temp\pip-install-zy3sege3\pyaesni_25cccf926a904b3da247f50d0acb4fa8\setup.py", line 83, in <module>
setup(
File "D:\codesafe\tgindexpro_venv\tg-index\venv\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\rayanf\AppData\Local\Programs\Python\Python310\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\rayanf\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\rayanf\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\codesafe\tgindexpro_venv\tg-index\venv\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\rayanf\AppData\Local\Programs\Python\Python310\lib\distutils\command\install.py", line 568, in run
self.run_command('build')
File "C:\Users\rayanf\AppData\Local\Programs\Python\Python310\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\rayanf\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\rayanf\AppData\Local\Programs\Python\Python310\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\rayanf\AppData\Local\Programs\Python\Python310\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\rayanf\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\codesafe\tgindexpro_venv\tg-index\venv\lib\site-packages\setuptools\command\build_ext.py", line 79, in run
_build_ext.run(self)
File "C:\Users\rayanf\AppData\Local\Programs\Python\Python310\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "C:\Users\rayanf\AppData\Local\Temp\pip-install-zy3sege3\pyaesni_25cccf926a904b3da247f50d0acb4fa8\setup.py", line 36, in build_extensions
raise RuntimeError('Cannot find CMake executable')
RuntimeError: Cannot find CMake executable
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> pyaesni
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
You should consider upgrading via the 'D:\codesafe\tgindexpro_venv\tg-index\venv\Scripts\python.exe -m pip install --upgrade pip' command.
(venv) D:\codesafe\tgindexpro_venv\tg-index>
Here is my code
await client.start(phone=phone, password=password)
await fast_upload(client=client, file_location=video_path, progress_bar_function=progress_callback)
await client.send_message(channel_id,
file=fast_upload,
attributes=(DocumentAttributeVideo(duration=duration, w=width, h=height),),
# caption=message_description,
thumb=thumb_pic,
)
Maybe I am doing something wrong but i've tried use file and file() and i can't send my file
The downloaded vertical screen video will be recognized as horizontal screen, causing the video to be stretched horizontally.
Hello
I have been using fasttelethon since 8 days and I'm facing below issue since last 4 days
Error: RPCError 420: FLOOD_PREMIUM_WAIT_3 (caused by SaveBigFilePartRequest)
code - 1
from FastTelethonhelper import fast_upload
client = TelegramClient(session_name, api_id, api_hash)
await client.connect()
result = await fast_upload(client, file_path)
await client.send_file(group_username, result)
...
code - 2
from FastTelethonhelper import download_file, upload_file
client = TelegramClient(session_name, api_id, api_hash)
await client.connect()
with open(file_path, "rb") as out:
result = await upload_file(client, out,name=file_path)
...
(maybe both codes are same)
using windows 10, uploaded nearly 9-10GB (each file around 500MB to 1GB) using this method and then it started hurting me
Looking at FLOOD_PREMIUM_WAIT_3, I thought I had to wait for 3 seconds, but didn't work, 3 hours wait didn't work
It's been 3 days and I'm still receiving this error
please help
Day 6 : less than 100MB uploads worked with fast upload
Day 7 : 100MB also error now, less than 50MB working with fast upload
I tried this
def progress_callback(current, total):
progress_bar.n = current
progress_bar.total = total
progress_bar.refresh()
progress_bar = tqdm(total=100, unit='B', unit_scale=True, desc='Uploading', leave=False)
await fast_upload(client, file_path, progress_callback=progress_callback)
But the progress is not working
Please help
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.