forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-02-25 20:08:58 +02:00
parent 80c954efdd
commit 5aa2c0e8c0
1 changed files with 5 additions and 0 deletions

View File

@ -231,10 +231,15 @@ class Submission(Base):
@property
@lazy
def domain(self):
print('1')
if not self.url: return None
print('2')
if self.url.startswith('/'): return SITE
print('3')
domain = urlparse(self.url).netloc
print('4')
if domain.startswith("www."): domain = domain.split("www.")[1]
print('5')
return domain.replace("old.reddit.com", "reddit.com")
@property