remotes/1693045480750635534/spooky-22
Aevann1 2021-08-11 20:59:09 +02:00
parent 3737b93b0d
commit 0a399bf41c
1 changed files with 4 additions and 3 deletions

View File

@ -310,12 +310,13 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing):
def realurl(self, v):
if v and v.agendaposter and random.randint(1, 10) < 4:
return 'https://secure.actblue.com/donate/ms_blm_homepage_2019'
elif self.url.startswith("https://old.reddit.com/"):
elif v and self.url.startswith("https://old.reddit.com/"):
url = self.url
if v and not v.oldreddit: url = self.url.replace("old.reddit.com", "reddit.com")
if v and v.controversial and '/comments/' in url:
if not v.oldreddit: url = self.url.replace("old.reddit.com", "reddit.com")
if v.controversial and '/comments/' in url:
if "?" in url: url += "&sort=controversial"
else: url += "/?sort=controversial"
return url
return ""
@property