diff --git a/stream.py b/stream.py index 3c203da..952f118 100755 --- a/stream.py +++ b/stream.py @@ -206,12 +206,12 @@ class UpstreamHandler(): data_new["og:video:width"] = data_raw.get("width") data_new["og:image:height"] = data_raw.get("thumbnail_height") data_new["og:image:width"] = data_raw.get("thumbnail_width") - for elem in data_new.values(): - if not isinstance(elem, str): - data_valid = False - break - if data_valid: - data = list(data_new.items()) + data_filtered = {} + for key in data_new: + value = data_new.get(key) + if isinstance(value, str): + data_filtered[key] = value + data = list(data_filtered.items()) except Exception as e: logger.info(e) logger.info(data)