mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-12 21:28:29 +03:00
tiktok bug fix
This commit is contained in:
@@ -53,10 +53,11 @@ class TiktokArchiver(Archiver):
|
|||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
logger.info(f'tmp file not found thus not deleted {filename}')
|
logger.info(f'tmp file not found thus not deleted {filename}')
|
||||||
cdn_url = self.storage.get_cdn_url(key)
|
cdn_url = self.storage.get_cdn_url(key)
|
||||||
|
timestamp = info.create.isoformat() if hasattr(info, "create") else None
|
||||||
|
|
||||||
return ArchiveResult(status=status, cdn_url=cdn_url, thumbnail=key_thumb,
|
return ArchiveResult(status=status, cdn_url=cdn_url, thumbnail=key_thumb,
|
||||||
thumbnail_index=thumb_index, duration=info.duration, title=info.caption, timestamp=info.create.isoformat(),
|
thumbnail_index=thumb_index, duration=getattr(info, "duration", 0), title=getattr(info, "caption", ""),
|
||||||
hash=hash, screenshot=screenshot)
|
timestamp=timestamp, hash=hash, screenshot=screenshot)
|
||||||
|
|
||||||
except tiktok_downloader.Except.InvalidUrl as e:
|
except tiktok_downloader.Except.InvalidUrl as e:
|
||||||
status = 'Invalid URL'
|
status = 'Invalid URL'
|
||||||
|
|||||||
Reference in New Issue
Block a user