mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Fix screenshot DNS resolver
This commit is contained in:
parent
0fd2713d5f
commit
d444f7b303
1 changed files with 6 additions and 1 deletions
|
@ -435,7 +435,12 @@ class OtherCog(commands.Cog):
|
|||
return await ctx.respond("No.")
|
||||
url = urlparse(url)
|
||||
if not url.scheme:
|
||||
url = url._replace(scheme="http")
|
||||
if "/" in url.path:
|
||||
hostname, path = url.path.split("/", 1)
|
||||
else:
|
||||
hostname = url.path
|
||||
path = ""
|
||||
url = url._replace(scheme="http", hostname=hostname, path=path)
|
||||
|
||||
friendly_url = textwrap.shorten(url.geturl(), 100)
|
||||
|
||||
|
|
Loading…
Reference in a new issue