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

Commit773efa8

Browse files
committed
Chilpit issues on expand and stats fixed
1 parent71f77cc commit773efa8

File tree

2 files changed

+412
-418
lines changed

2 files changed

+412
-418
lines changed

‎services/chilpit.py‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,22 @@ def shrink(self, bigurl):
1414
raiseShortyError(url)
1515

1616
defexpand(self,tinyurl):
17-
Service.expand(self,tinyurl)
18-
19-
# needs fixing
20-
"""turl = urlparse(tinyurl)
17+
turl=urlparse(tinyurl)
2118
ifturl[1].lstrip('www.')!='chilp.it':
2219
raiseShortyError('Not a chilp.it url')
23-
resp = request('http://p.chilp.it/api.php?' + turl[4])
20+
resp=request('http://p.chilp.it/api.php?'+turl[2][1:])
2421
url=resp.read()
2522
ifurl.startswith('http://'):
2623
returnurl.strip('\n\r')
2724
else:
28-
raise ShortyError(url)"""
25+
raiseShortyError(url)
2926

3027
# get click stats of the tinyurl
3128
defstats(self,tinyurl):
3229
turl=urlparse(tinyurl)
3330
ifturl[1].lstrip('www.')!='chilp.it':
3431
raiseShortyError('Not a chilp.it url')
35-
resp=request('http://s.chilp.it/api.php?'+turl[4])
32+
resp=request('http://s.chilp.it/api.php?'+turl[2][1:])
3633
hit_count=resp.read()
3734
try:
3835
returnint(hit_count)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp