File tree Expand file tree Collapse file tree 4 files changed +38
-1
lines changed Expand file tree Collapse file tree 4 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ Supported URL shortening services for shrinking long urls:
34
34
short.to
35
35
to.ly
36
36
budurl.com
37
+ kl.am
37
38
38
39
Shorty can expand any url service by getting the redirect
39
40
location by requesting the tiny url.
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ API available and ready to go!
3
3
+ burnurl.com
4
4
+ u.mavrev.com
5
5
+ snipr.com/snipurl.com/sn.im
6
- + kl.am
7
6
+ adjix.com
8
7
+ metamark.net (xrl.us)
9
8
+ idek.net
Original file line number Diff line number Diff line change
1
+ ## Shorty
2
+ ## Copyright 2009 Joshua Roesslein
3
+ ## See LICENSE
4
+
5
+ ## @url kl.am
6
+ class Klam (Service ):
7
+
8
+ def __init__ (self , apikey = None ):
9
+ self .apikey = apikey
10
+
11
+ def shrink (self , bigurl , tags = None ):
12
+ parameters = {'url' : bigurl , 'format' : 'text' }
13
+ if self .apikey :
14
+ parameters ['api_key' ] = self .apikey
15
+ if tags :
16
+ parameters ['tags' ] = tags
17
+ resp = request ('http://kl.am/api/shorten' , parameters )
18
+ return resp .read ()
19
+
Original file line number Diff line number Diff line change @@ -400,6 +400,23 @@ def expand(self, tinyurl):
400
400
401
401
bitly = Bitly ()
402
402
403
+ # klam
404
+ class Klam (Service ):
405
+
406
+ def __init__ (self , apikey = None ):
407
+ self .apikey = apikey
408
+
409
+ def shrink (self , bigurl , tags = None ):
410
+ parameters = {'url' : bigurl , 'format' : 'text' }
411
+ if self .apikey :
412
+ parameters ['api_key' ] = self .apikey
413
+ if tags :
414
+ parameters ['tags' ] = tags
415
+ resp = request ('http://kl.am/api/shorten' , parameters )
416
+ return resp .read ()
417
+
418
+ klam = Klam ()
419
+
403
420
# budurl
404
421
class Budurl (Service ):
405
422
@@ -671,6 +688,7 @@ def expand(self, tinyurl):
671
688
'short.to' : shortto ,
672
689
'budurl.com' : budurl ,
673
690
'digg.com' : digg ,
691
+ 'kl.am' : klam ,
674
692
'tweetburner.com' : tweetburner ,
675
693
'tr.im' : trim ,
676
694
'twurl.nl' : tweetburner ,
You can’t perform that action at this time.
0 commit comments