This commit is contained in:
Aevann1 2021-12-15 21:30:26 +02:00
parent 1e74386573
commit 1bdbd3cf1b
25 changed files with 104 additions and 716 deletions

View file

@ -207,8 +207,7 @@ class Submission(Base):
@property
@lazy
def domain(self):
if not self.url: return "text post"
if self.is_image: return "image"
domain = urlparse(self.url).netloc
if domain.startswith("www."): domain = domain.split("www.")[1]
return domain.replace("old.reddit.com", "reddit.com")