From 462d24ab5e4e87dd1413fac1b8d00af50ea5c869 Mon Sep 17 00:00:00 2001 From: Tomuxs Date: Sat, 9 Aug 2025 17:00:38 +0200 Subject: [PATCH] Ignore removed posts --- py34/list.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/py34/list.py b/py34/list.py index 7648931..4cdb5cb 100644 --- a/py34/list.py +++ b/py34/list.py @@ -46,9 +46,17 @@ class List: # Extract image img = entry.find_all("img")[0] if "src" in img.attrs: - img_src = parse_thumbnail_url(img["src"]) + img_src = img["src"] else: - img_src = parse_thumbnail_url(img["data-cfsrc"]) + img_src = img["data-cfsrc"] + + # Is it a deleted post? + if img_src.split('?')[0].endswith("thumbnail_.jpg"): + # Post has been deleted, continue + continue + + # Parse thumbnail url + img_src = parse_thumbnail_url(img_src) # Append post self.posts.append(Post(