Some videos don't render a duration for some reason

pull/25/head
Logan Williams 2022-03-18 09:44:17 +01:00
rodzic 0304860bce
commit d611aa1e14
1 zmienionych plików z 9 dodań i 6 usunięć

Wyświetl plik

@ -69,12 +69,15 @@ class TelegramArchiver(Archiver):
hash = self.get_hash(filename)
# extract duration from HTML
duration = s.find_all('time')[0].contents[0]
if ':' in duration:
duration = float(duration.split(
':')[0]) * 60 + float(duration.split(':')[1])
else:
duration = float(duration)
try:
duration = s.find_all('time')[0].contents[0]
if ':' in duration:
duration = float(duration.split(
':')[0]) * 60 + float(duration.split(':')[1])
else:
duration = float(duration)
except:
duration = ""
# process thumbnails
key_thumb, thumb_index = self.get_thumbnails(