remotes/1693045480750635534/spooky-22
Aevann1 2022-02-25 20:16:11 +02:00
parent 4b2dc9f337
commit 5e1f59f654
1 changed files with 2 additions and 6 deletions

View File

@ -231,15 +231,11 @@ class Submission(Base):
@property @property
@lazy @lazy
def domain(self): def domain(self):
print('1')
if not self.url: return None if not self.url: return None
print('2')
if self.url.startswith('/'): return SITE if self.url.startswith('/'): return SITE
print(f'url: {self.url}') if g.v.id == 1: print(self.url)
domain = urlparse(self.url).hostname domain = urlparse(self.url).netloc
print(f'domain1: {domain}')
if domain.startswith("www."): domain = domain.split("www.")[1] if domain.startswith("www."): domain = domain.split("www.")[1]
print(f'domain2: {domain}')
return domain.replace("old.reddit.com", "reddit.com") return domain.replace("old.reddit.com", "reddit.com")
@property @property