kopia lustrzana https://github.com/bellingcat/auto-archiver
Some videos don't render a duration for some reason
rodzic
0304860bce
commit
d611aa1e14
|
@ -69,12 +69,15 @@ class TelegramArchiver(Archiver):
|
||||||
hash = self.get_hash(filename)
|
hash = self.get_hash(filename)
|
||||||
|
|
||||||
# extract duration from HTML
|
# extract duration from HTML
|
||||||
|
try:
|
||||||
duration = s.find_all('time')[0].contents[0]
|
duration = s.find_all('time')[0].contents[0]
|
||||||
if ':' in duration:
|
if ':' in duration:
|
||||||
duration = float(duration.split(
|
duration = float(duration.split(
|
||||||
':')[0]) * 60 + float(duration.split(':')[1])
|
':')[0]) * 60 + float(duration.split(':')[1])
|
||||||
else:
|
else:
|
||||||
duration = float(duration)
|
duration = float(duration)
|
||||||
|
except:
|
||||||
|
duration = ""
|
||||||
|
|
||||||
# process thumbnails
|
# process thumbnails
|
||||||
key_thumb, thumb_index = self.get_thumbnails(
|
key_thumb, thumb_index = self.get_thumbnails(
|
||||||
|
|
Ładowanie…
Reference in New Issue