mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-12-22 22:15:23 +01:00
13 lines
363 B
Python
13 lines
363 B
Python
# this is duplicated in snipppets of code from all over the web, credit to no one
|
|
# in particular - to all those that have gone before me!
|
|
from future.moves.urllib.request import urlopen
|
|
|
|
|
|
def shorten(aUrl):
|
|
tinyurl = 'http://tinyurl.com/api-create.php?url='
|
|
req = urlopen(tinyurl + aUrl)
|
|
data = req.read()
|
|
|
|
# should be a tiny url
|
|
return data
|