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(