Skip to content

Commit

Permalink
Merge pull request TamilanBotsZ#11 from VoiceOfSha/patch-6
Browse files Browse the repository at this point in the history
Update utils.py
  • Loading branch information
TamilanBotsZ authored Feb 7, 2023
2 parents 7d761e5 + 8ca179b commit 07d21fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ async def get_shortlink(link):
https = "https"
link = link.replace("http", https)
url = f'https://shorturllink.in/api'
params = {'api': URL_SHORTNER_WEBSITE_API,
params = {'api': SHORTENER_API,
'url': link,
}

Expand All @@ -396,8 +396,8 @@ async def get_shortlink(link):
return data['shortenedUrl']
else:
logger.error(f"Error: {data['message']}")
return f'https://{URL_SHORTENR_WEBSITE}/api?api={URL_SHORTNER_WEBSITE_API}&link={link}'
return f'https://{SHORTENER_SITE}/api?api={SHORTNER_API}&link={link}'

except Exception as e:
logger.error(e)
return f'{URL_SHORTENR_WEBSITE}/api?api={URL_SHORTNER_WEBSITE_API}&link={link}'
return f'{SHORTENER_SITE}/api?api={SHORTNER_API}&link={link}'

0 comments on commit 07d21fc

Please sign in to comment.