Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit30dbbf6

Browse files
committed
Implemented hurl.ws service.
1 parenta7e598a commit30dbbf6

File tree

4 files changed

+37
-4
lines changed

4 files changed

+37
-4
lines changed

‎README‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Supported URL shortening services for shrinking long urls:
3636
budurl.com
3737
kl.am
3838
xr.com
39+
hurl.ws
3940

4041
Shorty can expand any url service by getting the redirect
4142
location by requesting the tiny url.

‎TODO‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ API available and ready to go!
88
+ idek.net
99
+ easyuri.com
1010
+ rubyurl.com
11-
+ hurl.ws
1211
+ nn.nf
1312
+ piurl.com
1413
+ icanhaz.com

‎services/hurlws.py‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Shorty
2+
## Copyright 2009 Joshua Roesslein
3+
## See LICENSE
4+
5+
## @url hurl.ws
6+
classHurlws(Service):
7+
8+
def__init__(self,username=None):
9+
self.username=username
10+
11+
defshrink(self,bigurl):
12+
parameters= {'url':bigurl}
13+
ifself.username:
14+
parameters['user']=self.username
15+
resp=request('http://www.hurl.ws/api/',post_data=urlencode(parameters))
16+
returnresp.read()
17+

‎shorty.py‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,21 @@ def expand(self, tinyurl):
286286

287287
cligs=Cligs()
288288

289+
# hurlws
290+
classHurlws(Service):
291+
292+
def__init__(self,username=None):
293+
self.username=username
294+
295+
defshrink(self,bigurl):
296+
parameters= {'url':bigurl}
297+
ifself.username:
298+
parameters['user']=self.username
299+
resp=request('http://www.hurl.ws/api/',post_data=urlencode(parameters))
300+
returnresp.read()
301+
302+
hurlws=Hurlws()
303+
289304
# toly
290305
classToly(Service):
291306

@@ -716,20 +731,21 @@ def expand(self, tinyurl):
716731
'twurl.nl':tweetburner,
717732
'buk.me':bukme,
718733
'fon.gs':fongs,
719-
'to.ly':toly,
734+
'ub0.cc':urlborg,
720735
'fwd4.me':fwd4me,
721736
'xr.com':xr,
722737
'short.ie':shortie,
723738
'sandbox.com':sandbox,
724739
'a.gd':agd,
740+
'hurl.ws':hurlws,
725741
'digg.com':digg,
726742
'kl.am':klam,
727-
'tweetburner.com':tweetburner,
743+
'to.ly':toly,
728744
'budurl.com':budurl,
729745
'cli.gs':cligs,
730746
'urlborg.com':urlborg,
731747
'is.gd':isgd,
732-
'ub0.cc':urlborg,
748+
'tweetburner.com':tweetburner,
733749
'x.bb':xr,
734750
'tinyurl.com':tinyurl,
735751
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp