diff --git a/src/priviblur_extractor/parse/collection_parsers.py b/src/priviblur_extractor/parse/collection_parsers.py index 9b89bd8..916e2d9 100644 --- a/src/priviblur_extractor/parse/collection_parsers.py +++ b/src/priviblur_extractor/parse/collection_parsers.py @@ -74,7 +74,7 @@ def __init__(self, target) -> None: @classmethod def process(cls, initial_data): - if initial_data.get("blog"): + if "blog" in initial_data: return cls(initial_data).parse() else: return None @@ -125,9 +125,9 @@ def __init__(self, target) -> None: @classmethod def process(cls, initial_data): - if initial_data.get("timeline"): + if "timeline" in initial_data: return cls(initial_data).parse() - elif initial_data.get("notes"): + elif "notes" in initial_data: return cls(initial_data).parse_note_sequence() else: return None diff --git a/src/priviblur_extractor/parse/items.py b/src/priviblur_extractor/parse/items.py index 89bad87..23c5165 100644 --- a/src/priviblur_extractor/parse/items.py +++ b/src/priviblur_extractor/parse/items.py @@ -280,7 +280,7 @@ def process(cls, initial_data): if initial_data.get("type") == "reblog": # If blog data isn't given under a blog object then # the note is likely a simple reblog note - if initial_data.get("blogName"): + if "blogName" in initial_data: return cls(initial_data).parse_simple() return cls(initial_data).parse()