mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
acortame.py: if we try to expand an URL not shortened by the service, use generic URL unshortener in the base class
This commit is contained in:
parent
24756e73d3
commit
f18a03d4a1
@ -18,7 +18,9 @@ class AcortameShortener (URLShortener):
|
||||
return 'acorta.me' in url
|
||||
|
||||
def unshorten (self, url):
|
||||
|
||||
if not 'acorta.me' in url:
|
||||
#use generic expand method
|
||||
return super(AcortameShortener, self).unshorten(url)
|
||||
answer = url
|
||||
api = requests.get ("https://acorta.me/api.php?action=expand&format=simple&shorturl=" + urllib.quote(url))
|
||||
if api.status_code == 200:
|
||||
|
Loading…
Reference in New Issue
Block a user