Added something I forgot to push
This commit is contained in:
parent
63cc79371d
commit
5e99e1a82f
1 changed files with 7 additions and 0 deletions
|
@ -32,6 +32,13 @@ def isgd(url):
|
||||||
return request["shorturl"]
|
return request["shorturl"]
|
||||||
|
|
||||||
|
|
||||||
|
def try_isgd(url):
|
||||||
|
try:
|
||||||
|
out = isgd(url)
|
||||||
|
except (ShortenError, http.HTTPError):
|
||||||
|
out = url
|
||||||
|
return out
|
||||||
|
|
||||||
def haste(text, ext='txt'):
|
def haste(text, ext='txt'):
|
||||||
""" pastes text to a hastebin server """
|
""" pastes text to a hastebin server """
|
||||||
page = http.get(paste_url + "/documents", post_data=text)
|
page = http.get(paste_url + "/documents", post_data=text)
|
||||||
|
|
Reference in a new issue