File tree Expand file tree Collapse file tree 4 files changed +30
-2
lines changed Expand file tree Collapse file tree 4 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ Supported URL shortening services for shrinking long urls:
21
21
tr.im hurl.ws
22
22
urlborg.com xr.com
23
23
bit.ly snipurl.com
24
- is.gd
24
+ is.gd hex.io
25
25
cli.gs
26
26
twurl.nl (tweetburner)
27
27
digg.com
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ API available and ready to go!
11
11
+ icanhaz.com
12
12
+ shrinkify.com
13
13
+ abbrr.com
14
- + hex.io
15
14
+ go2cut.com
16
15
+ shw.me
17
16
+ lin.cr
Original file line number Diff line number Diff line change
1
+ ## Shorty
2
+ ## Copyright 2009 Joshua Roesslein
3
+ ## See LICENSE
4
+
5
+ ## @url hex.io
6
+ class Hexio (Service ):
7
+
8
+ def shrink (self , bigurl ):
9
+ resp = request ('http://hex.io/api-create.php' , {'url' : bigurl })
10
+ url = resp .read ()
11
+ if url .startswith ('http' ):
12
+ return url
13
+ else :
14
+ raise ShortyError ('Failed to shrink url' )
15
+
Original file line number Diff line number Diff line change @@ -347,6 +347,19 @@ def expand(self, tinyurl):
347
347
348
348
fongs = Fongs ()
349
349
350
+ # hexio
351
+ class Hexio (Service ):
352
+
353
+ def shrink (self , bigurl ):
354
+ resp = request ('http://hex.io/api-create.php' , {'url' : bigurl })
355
+ url = resp .read ()
356
+ if url .startswith ('http' ):
357
+ return url
358
+ else :
359
+ raise ShortyError ('Failed to shrink url' )
360
+
361
+ hexio = Hexio ()
362
+
350
363
# burnurl
351
364
class Burnurl (Service ):
352
365
@@ -813,6 +826,7 @@ def expand(self, tinyurl):
813
826
'digg.com' : digg ,
814
827
'kl.am' : klam ,
815
828
'to.ly' : toly ,
829
+ 'hex.io' : hexio ,
816
830
'budurl.com' : budurl ,
817
831
'cli.gs' : cligs ,
818
832
'urlborg.com' : urlborg ,
You can’t perform that action at this time.
0 commit comments