clonechat
clonechat copied to clipboard
trying again... Due to: Telegram says: [400 MEDIA_CAPTION_TOO_LONG] - The media caption is too long (caused by "messages.SendMedia")
ao tentar clonar o conteudo de varios grupos ocorre essa mensagem
trying again... Due to: Telegram says: [400 MEDIA_CAPTION_TOO_LONG] - The media caption is too long (caused by "messages.SendMedia")
grupo: Courses - Online
continua sendo um problema para voce?
continua sendo um problema para voce?
Opa, infelizmente sim, tento realizar o clone de alguns grupos e simplesmente trava, desta forma não consigo clonar todos os grupso que preciso.
criei um .sh onde coloco varios clones, então quando da erro em 1 os proximos não são executados.
do you still have the problem? .....
I only solve it "quick and dirty for myself"..... i add for every filetype (here as example for type photo):
except Exception as e:
print(f"trying again... Due to: {e}")
tg.send_photo(
chat_id=destination_chat,
photo=photo_id,
caption="",
)**
time.sleep(10)
important is:
caption=""
def foward_video(message, destination_chat): caption = get_caption(message) video_id = message.video.file_id MAX_CAPTION_LENGTH = 1024 # Limitar el subtítulo a 1024 caracteres
# Verificar si el subtítulo es demasiado largo y acortarlo si es necesario
if len(caption) > MAX_CAPTION_LENGTH:
caption = caption[:MAX_CAPTION_LENGTH]
try:
tg.send_video(
chat_id=destination_chat,
video=video_id,
caption=caption,
)
return
except FloodWait as e:
print(f"..FloodWait {e.value} seconds..")
time.sleep(e.value)
except Exception as e:
print(f"trying again... Due to: {e}")
time.sleep(10)
foward_video(message, destination_chat)