Git Product home page Git Product logo

ytdlbot's People

Contributors

adityabotsex avatar bartixxx32 avatar bennythink avatar dependabot[bot] avatar deusyu avatar gengjiawen avatar jasonkhew96 avatar kran0 avatar n0vad3v avatar nasirhossainakash avatar oelberte avatar qunas101 avatar sanujans avatar tomyangsh avatar vuisme 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ytdlbot's Issues

Bot going not well

It seems the bot doesn't run well on my server. I don't know where goes wrong.
My server OS is CentOS 8.5,python's version is 3.6.8

when I send '/about' command ,the bot replies the repo link normally.
when send '/ping' command , error message is :

Telegram says: [400 MESSAGE_TOO_LONG] - The message text is over 4096 characters (caused by "messages.SendMessage")

When send a video link or '/setting' command , error message is as follows:

[2022-04-07 09:20:54 dispatcher.py:136 I] Started 100 HandlerTasks
[2022-04-07 09:21:01 dispatcher.py:235 E] module 'six' has no attribute 'ensure_str'
Traceback (most recent call last):
  File "/usr/local/lib64/python3.6/site-packages/pyrogram/dispatcher.py", line 228, in handler_worker
    *args
  File "/usr/lib64/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "ytdl_bot.py", line 76, in wrapper
    return func(client, message)
  File "ytdl_bot.py", line 265, in download_handler
    red.user_count(chat_id)
  File "/root/ytdlbot/ytdlbot/db.py", line 133, in user_count
    self.r.hincrby("metrics", user_id)
  File "/usr/local/lib/python3.6/site-packages/redis/commands/core.py", line 3717, in hincrby
    return self.execute_command("HINCRBY", name, key, amount)
  File "/usr/local/lib/python3.6/site-packages/redis/client.py", line 1180, in execute_command
    lambda error: self._disconnect_raise(conn, error),
  File "/usr/local/lib/python3.6/site-packages/redis/retry.py", line 45, in call_with_retry
    return do()
  File "/usr/local/lib/python3.6/site-packages/redis/client.py", line 1178, in <lambda>
    conn, command_name, *args, **options
  File "/usr/local/lib/python3.6/site-packages/redis/client.py", line 1152, in _send_command_parse_response
    conn.send_command(*args)
  File "/usr/local/lib/python3.6/site-packages/redis/connection.py", line 796, in send_command
    self.pack_command(*args), check_health=kwargs.get("check_health", True)
  File "/usr/local/lib/python3.6/site-packages/redis/connection.py", line 777, in send_packed_command
    self._sock.sendall(item)
  File "/usr/local/lib/python3.6/site-packages/fakeredis/_server.py", line 836, in sendall
    self._parser.send(data)
  File "/usr/local/lib/python3.6/site-packages/fakeredis/_server.py", line 753, in _parse_commands
    self._process_command(fields)
  File "/usr/local/lib/python3.6/site-packages/fakeredis/_server.py", line 843, in _process_command
    func, func_name = self._name_to_func(fields[0])
  File "/usr/local/lib/python3.6/site-packages/fakeredis/_server.py", line 822, in _name_to_func
    name = six.ensure_str(name, encoding='utf-8', errors='replace')
AttributeError: module 'six' has no attribute 'ensure_str'
^C[2022-04-07 09:21:22 idle.py:77 I] Stop signal received (SIGINT). Exiting...
[2022-04-07 09:21:23 dispatcher.py:149 I] Stopped 100 HandlerTasks
[2022-04-07 09:21:23 session.py:269 I] PingTask stopped
[2022-04-07 09:21:23 connection.py:77 I] Disconnected
[2022-04-07 09:21:23 session.py:288 I] NetworkTask stopped
[2022-04-07 09:21:23 session.py:174 I] Session stopped

400 API_ID_INVALID(api_id/api_hash combination is invalid)

Hi, thanks for offering so amazing bot. Unfortunately I met a problem.
I got my api_id and api_hash from https://my.telegram.org/apps, checked many times and I'm sure they are right.

App api_id:13******
App api_hash:9e7**************************e21
DC 2

I put them to app.json and ran ytdl_bot.py, finally an error occurred:

pyrogram.errors.exceptions.bad_request_400.ApiIdInvalid: Telegram says: [400 API_ID_INVALID] - The api_id/api_hash combination is invalid (caused by "auth.ImportBotAuthorization")

I've googled that, turned out to be Telegram's fault. API ID that over 5 digits may goes wrong in combination. Telegram said they've fixed this problem but not well for me.

LonamiWebs/Telethon#46
LonamiWebs/Telethon#836
steavy29/Telegram.Net#27

Is there anything I did wrong?Any suggestions ?
By the way, my api_id is 8 digit.

Progressbar not accurate

We does actually have a little problem (not very important, but still)
The progress bar isn't accurate, as shown under :

38% looks like 50%
82% looks like 95%

Why ?
Because of the definition of that progress bar (maybe you need to make changes here)

The fact is that the completed string (█) takes way more space than the remaining string ( )

How to fix it ?
◽By changing those strings to something that takes the same place
Examples : ⬢⬡ / ▰▱
◽ By putting the progressbar in monospace (not sure it works)

Video Resolution Problem

I think the bot sends you the video in compressed form which lowers the video quality, can you provide an option so that the bot send the video uncompressed with the video's highest resolution. Telegram has that default compressing option which compresses the video to go fast but the thing I want is that there should be a option to choose where I want compressed or uncompressed video. Hopefully this will be added!

Bot Not working

FileNotFoundError: [Errno 2] No such file or directory: '/var/log/ytdl.log'
2022-01-18T07:27:42.692909+00:00 app[worker.1]: Job "auto_restart (trigger: interval[0:00:05], next run at: 2022-01-18 15:27:47 CST)" raised an exception
2022-01-18T07:27:42.692922+00:00 app[worker.1]: Traceback (most recent call last):
2022-01-18T07:27:42.692923+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/apscheduler/executors/base.py", line 125, in run_job
2022-01-18T07:27:42.692923+00:00 app[worker.1]: retval = job.func(*job.args, **job.kwargs)
2022-01-18T07:27:42.692924+00:00 app[worker.1]: File "/app/ytdlbot/utils.py", line 213, in auto_restart
2022-01-18T07:27:42.692924+00:00 app[worker.1]: with open("/var/log/ytdl.log") as f:
2022-01-18T07:27:42.692925+00:00 app[worker.1]: FileNotFoundError: [Errno 2] No such file or directory: '/var/log/ytdl.log'
2022-01-18T07:27:47.692831+00:00 app[worker.1]: Job "auto_restart (trigger: interval[0:00:05], next run at: 2022-01-18 15:27:52 CST)" raised an exception
2022-01-18T07:27:47.692841+00:00 app[worker.1]: Traceback (most recent call last):
2022-01-18T07:27:47.692841+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/apscheduler/executors/base.py", line 125, in run_job
2022-01-18T07:27:47.692841+00:00 app[worker.1]: retval = job.func(*job.args, **job.kwargs)
2022-01-18T07:27:47.692842+00:00 app[worker.1]: File "/app/ytdlbot/utils.py", line 213, in auto_restart
2022-01-18T07:27:47.692842+00:00 app[worker.1]: with open("/var/log/ytdl.log") as f:
2022-01-18T07:27:47.692843+00:00 app[worker.1]: FileNotFoundError: [Errno 2] No such file or directory: '/var/log/ytdl.log'
2022-01-18T07:27:52.692770+00:00 app[worker.1]: Job "auto_restart (trigger: interval[0:00:05], next run at: 2022-01-18 15:27:57 CST)" raised an exception
2022-01-18T07:27:52.692781+00:00 app[worker.1]: Traceback (most recent call last):
2022-01-18T07:27:52.692781+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/apscheduler/executors/base.py", line 125, in run_job
2022-01-18T07:27:52.692782+00:00 app[worker.1]: retval = job.func(*job.args, **job.kwargs)
2022-01-18T07:27:52.692782+00:00 app[worker.1]: File "/app/ytdlbot/utils.py", line 213, in auto_restart
2022-01-18T07:27:52.692782+00:00 app[worker.1]: with open("/var/log/ytdl.log") as f:
2022-01-18T07:27:52.692783+00:00 app[worker.1]: FileNotFoundError: [Errno 2] No such file or directory: '/var/log/ytdl.log'

Add this please

Please add quality (resolution) select buttons which appear after sending link
Second add heroku deploy button
Third if u can please add Google drive upload options

Flower problem docker-compose

Hello im trying to setup bot using dockercompose, as i read README i dont want vip system then i commented out mysql and redis from the compose file:
as shown below

version: '3.1'

services:
  socat:
    image: jmb12686/socat
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    entrypoint: [ "socat", "tcp-listen:2375,fork,reuseaddr","unix-connect:/var/run/docker.sock" ]

  #redis:
    #image: redis:alpine
    #restart: always
    #logging:
    #  driver: none
    #ports:
    #  - "6379:6379"

  #mysql:
    #image: mariadb
    #restart: always
    #volumes:
    #  - ./db_data:/var/lib/mysql
    #environment:
    #  MYSQL_ROOT_PASSWORD: 'root'
    #logging:
    #  driver: none
    #ports:
    #  - "3306:3306"

  ytdl:
    image: bennythink/ytdlbot
    env_file:
      - env/ytdl.env
    restart: always
    depends_on:
      - socat
    volumes:
      - ./data/instagram.com_cookies.txt:/ytdlbot/ytdlbot/instagram.com_cookies.txt
      - ./data/vnstat/:/var/lib/vnstat/

  flower:
    image: bennythink/ytdlbot
    env_file:
      - env/ytdl.env
    restart: on-failure
    command: [ "/usr/local/bin/celery",
               "-A", "flower_tasks", "flower",
               "--basic_auth=benny:123456",
               "--address=0.0.0.0", "--persistent","--purge_offline_workers=3600" ]
    volumes:
      - ./data/flower:/ytdlbot/ytdlbot/flower
    ports:
      - "5555:5555"

next i made env file

TOKEN=515*************Ibc
APP_ID=1*****2
APP_HASH=a38**********3713c
OWNER=Bartixxx

thats my config, i also tried step 3.2.2
i have go to ./data/ whih is /home/pi/ytbot/data
i did

import dbm;dbm.open("flower","n");exit()

in python console, flower.db file was created

but still i have errors

Some pics:

image
image
image

docker image builder fails at "build and push step"

/usr/bin/docker buildx build --cache-from type=local,src=/tmp/.buildx-cache --cache-to type=local,dest=/tmp/.buildx-cache-new,mode=max --iidfile /tmp/docker-build-push-GfE4m1/iidfile --platform linux/arm,linux/amd64,linux/arm64 --tag ***/ --tag ghcr.io/ --metadata-file /tmp/docker-build-push-GfE4m1/metadata-file --push .  
error: invalid tag "***/": invalid reference format  
Error: buildx failed with: error: invalid tag "***/": invalid reference format

Feature request : direct audio and metadata edit

It would be really cool if we can simply download only the audio by using a specific command (such as /audio or /a) with the link on the message, or by replying to a supported link with that command

Next enhancement that can be done is the ability to set custom metadata for the download we want (would work only for audio)
Like having a /meta command, then we specify the Artist and the Title
Example : /meta Roy Knox:Until The End (here the separator is a colon, but it could be something else)
I say this because when we have a mp3 file, Telegram shows the title and artist of the file
Can work as shown here

Upload downloaded file before downloading entire playlist and private video bug

First off, thanks for this amazing bot. my issues: 1) when downloading a playlist contating for example 50 videos, currently bot downloads all 50 videos first, then starts uploading one by one. If possible, Instead if it is made to upload each video first before beginning next download of second video, space consumption in local drive is minimised and will bw hwlpful for those with limited drive space (like me)
2) If there is a private or deleted video in a playlist, all the downloads stop. instead if there is an ability to skip those videos and download and upload others, it will be more useful. Thanks.

Geo blocking

May i ask how to fix the geo blocking problem?

Failed to download from twitter, also ping button doesn't seem to work

I got an error when trying to download twitter video, I got:

Traceback (most recent call last):
  File "/app/downloader.py", line 97, in ytdl_download
    ydl.download([url])
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 2068, in download
    res = self.extract_info(
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 808, in extract_info
    return self.__extract_info(url, ie, download, extra_info, process)
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 847, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 881, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 1692, in process_video_result
    self.process_info(new_info)
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 1976, in process_info
    success = dl(filename, info_dict)
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 1915, in dl
    return fd.download(name, info)
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/downloader/hls.py", line 78, in real_download
    return fd.real_download(filename, info_dict)
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/downloader/external.py", line 35, in real_download
    retval = self._call_downloader(tmpfilename, info_dict)
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/downloader/external.py", line 227, in _call_downloader
    self.report_error('m3u8 download detected but ffmpeg or avconv could not be found. Please install one.')
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/downloader/common.py", line 165, in report_error
    self.ydl.report_error(*args, **kargs)
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 628, in report_error
    self.trouble(error_message, tb)
  File "/app/.heroku/python/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 598, in trouble
    raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: m3u8 download detected but ffmpeg or avconv could not be found. Please install one.

also on ping button I got log on heroku like this:

2021-08-16T00:16:19.695433+00:00 app[worker.1]: 2021-08-16 00:16:19,695 - ytdl.py [INFO]: Download complete.
2021-08-16T00:22:06.411351+00:00 app[worker.1]: 2021-08-16 00:22:06,410 - dispatcher.py [ERROR]: [400 MESSAGE_TOO_LONG]: The message text is over 4096 characters (caused by "messages.SendMessage")
2021-08-16T00:22:06.411360+00:00 app[worker.1]: Traceback (most recent call last):
2021-08-16T00:22:06.411361+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/dispatcher.py", line 219, in handler_worker
2021-08-16T00:22:06.411362+00:00 app[worker.1]:     await self.loop.run_in_executor(
2021-08-16T00:22:06.411363+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.9/concurrent/futures/thread.py", line 52, in run
2021-08-16T00:22:06.411363+00:00 app[worker.1]:     result = self.fn(*self.args, **self.kwargs)
2021-08-16T00:22:06.411363+00:00 app[worker.1]:   File "/app/ytdl.py", line 52, in ping_handler
2021-08-16T00:22:06.411364+00:00 app[worker.1]:     client.send_message(chat_id, bot_info)
2021-08-16T00:22:06.411364+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/sync.py", line 50, in async_to_sync_wrap
2021-08-16T00:22:06.411365+00:00 app[worker.1]:     return asyncio.run_coroutine_threadsafe(coroutine, loop).result()
2021-08-16T00:22:06.411365+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.9/concurrent/futures/_base.py", line 445, in result
2021-08-16T00:22:06.411366+00:00 app[worker.1]:     return self.__get_result()
2021-08-16T00:22:06.411366+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result
2021-08-16T00:22:06.411367+00:00 app[worker.1]:     raise self._exception
2021-08-16T00:22:06.411367+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/methods/messages/send_message.py", line 125, in send_message
2021-08-16T00:22:06.411368+00:00 app[worker.1]:     r = await self.send(
2021-08-16T00:22:06.411368+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/methods/advanced/send.py", line 77, in send
2021-08-16T00:22:06.411369+00:00 app[worker.1]:     r = await self.session.send(
2021-08-16T00:22:06.411369+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/session/session.py", line 425, in send
2021-08-16T00:22:06.411369+00:00 app[worker.1]:     return await self._send(data, timeout=timeout)
2021-08-16T00:22:06.411370+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/session/session.py", line 395, in _send
2021-08-16T00:22:06.411370+00:00 app[worker.1]:     RPCError.raise_it(result, type(data))
2021-08-16T00:22:06.411370+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.9/site-packages/pyrogram/errors/rpc_error.py", line 78, in raise_it
2021-08-16T00:22:06.411371+00:00 app[worker.1]:     raise getattr(
2021-08-16T00:22:06.411371+00:00 app[worker.1]: pyrogram.errors.exceptions.bad_request_400.MessageTooLong: [400 MESSAGE_TOO_LONG]: The message text is over 4096 characters (caused by "messages.SendMessage")

Overall this is a good work.

Feature request

Feature request:

  • #50
  • 2. Set limit for selfhosted bot to do only one url at once, for example i send to it links in order
youtube.com/1
youtube.com/2
youtube.com/3

And it will process one by one to send output files in good order, not sending smaller first when doing concurrent downloads.

Docker-compose youtube subscription not working

I installed bot using docker-compose, mysql, redis.

Subscribe to youtube and ping does not work.
Tell me, please, what could be the problem?

Thank you!

Errors when adding a subscription:

ytdl_1 | [2022-04-14 17:42:32 limit.py:162 I] Latest video rk3OitqWCog from Alexandr Plushev ytdl_1 | [2022-04-14 17:42:32 dispatcher.py:235 E] (1136, "Column count doesn't match value count at row 1") ytdl_1 | Traceback (most recent call last): ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pyrogram/dispatcher.py", line 224, in handler_worker ytdl_1 | await self.loop.run_in_executor( ytdl_1 | File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run ytdl_1 | result = self.fn(*self.args, **self.kwargs) ytdl_1 | File "/ytdlbot/ytdlbot/ytdl_bot.py", line 111, in subscribe_handler ytdl_1 | result = vip.subscribe_channel(chat_id, link) ytdl_1 | File "/ytdlbot/ytdlbot/limit.py", line 95, in subscribe_channel ytdl_1 | self.cur.execute("INSERT INTO subscribe values(%s,%s)", (user_id, channel_id)) ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pymysql/cursors.py", line 148, in execute ytdl_1 | result = self._query(query) ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pymysql/cursors.py", line 310, in _query ytdl_1 | conn.query(q) ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pymysql/connections.py", line 548, in query ytdl_1 | self._affected_rows = self._read_query_result(unbuffered=unbuffered) ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pymysql/connections.py", line 775, in _read_query_result ytdl_1 | result.read() ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pymysql/connections.py", line 1156, in read ytdl_1 | first_packet = self.connection._read_packet() ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pymysql/connections.py", line 725, in _read_packet ytdl_1 | packet.raise_for_error() ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pymysql/protocol.py", line 221, in raise_for_error ytdl_1 | err.raise_mysql_exception(self._data) ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pymysql/err.py", line 143, in raise_mysql_exception ytdl_1 | raise errorclass(errno, errval) ytdl_1 | pymysql.err.OperationalError: (1136, "Column count doesn't match value count at row 1")

Error when "ping":

ytdl_1 | [2022-04-14 17:48:36 dispatcher.py:235 E] Telegram says: [400 MESSAGE_TOO_LONG] - The message text is over 4096 characters (caused by "messages.SendMessage") ytdl_1 | Traceback (most recent call last): ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pyrogram/dispatcher.py", line 224, in handler_worker ytdl_1 | await self.loop.run_in_executor( ytdl_1 | File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run ytdl_1 | result = self.fn(*self.args, **self.kwargs) ytdl_1 | File "/ytdlbot/ytdlbot/ytdl_bot.py", line 167, in ping_handler ytdl_1 | client.send_message(chat_id, f"{bot_info}") ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pyrogram/sync.py", line 78, in async_to_sync_wrap ytdl_1 | return asyncio.run_coroutine_threadsafe(coroutine, main_loop).result() ytdl_1 | File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 446, in result ytdl_1 | return self.__get_result() ytdl_1 | File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result ytdl_1 | raise self._exception ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pyrogram/methods/messages/send_message.py", line 128, in send_message ytdl_1 | r = await self.send( ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pyrogram/methods/advanced/send.py", line 77, in send ytdl_1 | r = await self.session.send( ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pyrogram/session/session.py", line 362, in send ytdl_1 | return await self._send(data, timeout=timeout) ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pyrogram/session/session.py", line 332, in _send ytdl_1 | RPCError.raise_it(result, type(data)) ytdl_1 | File "/usr/local/lib/python3.9/site-packages/pyrogram/errors/rpc_error.py", line 91, in raise_it ytdl_1 | raise getattr( ytdl_1 | pyrogram.errors.exceptions.bad_request_400.MessageTooLong: Telegram says: [400 MESSAGE_TOO_LONG] - The message text is over 4096 characters (caused by "messages.SendMessage")

Heroku Support

Hi, I checked a lot of bots that are not working for Dailymotion but only yours is working. Can you please make it possible to deploy to Heroku? As I know nothing python so it's not possible for me to add Heroku support. I don't want to abuse the bot hosted by yourself 😅

Tiktok issue

Hi, so tiktok is downloading video with tiktok watermark, is there any solution to fix it ?

Environment variable AUTHORIZED_USER has no effect

In “config.py” file, the code in line 43 to get the environment variable AUTHORIZED_USER is

#limitation settings
AUTHORIZED_USER: "str" = os.getenv("AUTHORIZED", "")

However, the guide says the environment variable to be set is AUTHORIZED_USER, which will invalidate the user limitation function.
I thought it may be better to have the same description on both sides.

REDIS

I deployed the bot on heroku but it didn't asked me to fill "REDIS" variable.

But I know how to add it manually but I don't know what should I fill in that variable value.

Can you help me?

Tik tok issue

Hi, i am getting this error after sending link to tik tok.
Is there any way to fix it ?
IMG_20220106_132514

Heroku MYSQL

how to add heroku to my sql is there any tutorial

I get this error in heroku log

File "/app/ytdlbot/ytdl_bot.py", line 236, in
2022-01-12T08:57:58.803374+00:00 app[worker.1]: Version: {get_revision()}
2022-01-12T08:57:58.803376+00:00 app[worker.1]: File "/app/ytdlbot/utils.py", line 107, in get_revision
2022-01-12T08:57:58.803458+00:00 app[worker.1]: revision = subprocess.check_output("git -C ../ rev-parse --short HEAD".split()).decode("u8").replace("\n", "")
2022-01-12T08:57:58.803466+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/subprocess.py", line 424, in check_output
2022-01-12T08:57:58.803618+00:00 app[worker.1]: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
2022-01-12T08:57:58.803618+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/subprocess.py", line 528, in run
2022-01-12T08:57:58.803775+00:00 app[worker.1]: raise CalledProcessError(retcode, process.args,
2022-01-12T08:57:58.803840+00:00 app[worker.1]: subprocess.CalledProcessError: Command '['git', '-C', '../', 'rev-parse', '--short', 'HEAD']' returned non-zero exit status 128.
2022-01-12T08:57:59.273816+00:00 heroku[worker.1]: State changed from up to crashed
2022-01-12T08:57:59.196568+00:00 heroku[worker.1]: Process exited with status 1

Instagram issue

Hi so when i send link to Instagram video, bot says : "You need to log in to access this content. Use --cookies, --username and --password, or --netrc to provide account credentials"

Is there a way to put the login and pass data to script ?

About Heroku

Through the background observation, it is found that this demo has been running all tims, consuming a lot of free time, so may I add startup parameters to start when it becomes used

Bot Freezing

Screenshot_20220219-170558_Plus

the bot sometimes freezes like this, the process is interrupted like this

Bugs what i have discovered so far

  • #59

  • Seems the codec for 4k video (which is default high quality) even struggless on flagship phone. Oneplus 7Pro

Idea to reslove:

  • Find other way to resolve the issue or V

    • Change way to pick resolution in /settings from High/Mid/Low to > (highest avalible) / 1080 / 720 / 480 / 360 to make user more control on resolution he is searching
  • Bot seems treating all youtube shorts as one, steps to reproduce

    1. Send bot youtube short with /shorts/ in url
    2. let bot send downloaded short
    3. send other short from youtube, and if bug was reproduced successfully, bot should resend old short from step II.
  • The convert to audio Inline button do not appear on videos forwarded from ARCHIVE channel
    Idea to reslove:

  • I dont know if its possible to add inline button to arleady existing and forwarded message, but if not add workaround to it by adding clickable LINK(command) inside the message for example


Video Name.mp4

https://youtu.be/examplevideo

Info: 854x480 4.9MiB 125s

Downloaded by Unknown

Click to convert: clickme


Video title

Hello programmers!

Could you please add a title to all of the videos, like the youtube title it has?

/ping does not work

I don't know if it's an owner-only feature, but ping command systematically fails :

Runtime information is not available outside of docker container. Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/tgbot_ping/__init__.py", line 19, in get_runtime info, raw_data = __get_container_info(container_name, display_name) File "/usr/local/lib/python3.9/site-packages/tgbot_ping/__init__.py", line 62, in __get_container_info cpu = __calculate_cpu_percent(stats) File "/usr/local/lib/python3.9/site-packages/tgbot_ping/__init__.py", line 78, in __calculate_cpu_percent system_delta = float(d["cpu_stats"]["system_cpu_usage"]) - \ KeyError: 'system_cpu_usage'

Playlist option

As I already asked, follow your instructions - THIS IS A NOTE FOR playlist option support.

Thank you very much for that effort!

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.