fsdfsd
This commit is contained in:
parent
ad96ef747d
commit
c49485b613
1 changed files with 1 additions and 0 deletions
|
@ -207,6 +207,7 @@ class Submission(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def domain(self):
|
def domain(self):
|
||||||
|
if self.url.startswith('/'): return site
|
||||||
domain = urlparse(self.url).netloc
|
domain = urlparse(self.url).netloc
|
||||||
if domain.startswith("www."): domain = domain.split("www.")[1]
|
if domain.startswith("www."): domain = domain.split("www.")[1]
|
||||||
return domain.replace("old.reddit.com", "reddit.com")
|
return domain.replace("old.reddit.com", "reddit.com")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue