forked from MarseyWorld/MarseyWorld
fsdfsd
parent
c3c18e512e
commit
177c280668
|
@ -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…
Reference in New Issue