mirror of
				https://github.com/MCV-Software/TWBlue.git
				synced 2025-10-30 03:52:00 +00: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:
		| @@ -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: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jose Manuel Delicado
					Jose Manuel Delicado