Ignore removed posts
This commit is contained in:
12
py34/list.py
12
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(
|
||||
|
||||
Reference in New Issue
Block a user