From 407cbdf7a6008be9199d1989defd7bfdcc72abc1 Mon Sep 17 00:00:00 2001 From: Hodza Alban Date: Tue, 8 Aug 2017 08:20:46 +0200 Subject: [PATCH] removed formats without audio --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index dc6afa2..c57bd2a 100644 --- a/main.py +++ b/main.py @@ -50,8 +50,10 @@ def get_format(bot, update): while True: # save the formats in the formats list try: line = next(it) - if not line: # the last line is empty... + if not line: # the last line usually is empty... raise StopIteration + if "video only" in line: # video without audio... why? + continue except StopIteration: break else: