This commit is contained in:
msramalho
2023-07-28 10:49:39 +01:00
parent 1b44a302cd
commit fc93ebaba0
3 changed files with 2 additions and 3 deletions

View File

@@ -105,7 +105,6 @@ class ArchivingOrchestrator:
# looks for Media in result.media and also result.media[x].properties (as list or dict values) # looks for Media in result.media and also result.media[x].properties (as list or dict values)
result.store() result.store()
#TODO: remove any duplicate media, if hash is available
# 6 - format and store formatted if needed # 6 - format and store formatted if needed
# enrichers typically need access to already stored URLs etc # enrichers typically need access to already stored URLs etc

View File

@@ -1,9 +1,8 @@
from __future__ import annotations from __future__ import annotations
from dataclasses import dataclass, field from dataclasses import dataclass
from inspect import ClassFoundException from inspect import ClassFoundException
from typing import Type from typing import Type
from abc import ABC from abc import ABC
# from collections.abc import Iterable
@dataclass @dataclass

View File

@@ -20,6 +20,7 @@ def expand_url(url):
logger.error(f'Failed to expand url {url}') logger.error(f'Failed to expand url {url}')
return url return url
def getattr_or(o: object, prop: str, default=None): def getattr_or(o: object, prop: str, default=None):
try: try:
res = getattr(o, prop) res = getattr(o, prop)