~khurshid-alam/gwibber/gwibber-hack

« back to all changes in this revision

Viewing changes to gwibber/microblog/urlshorter/snipurlcom.py

  • Committer: Khurshid Alam
  • Date: 2012-04-06 14:38:38 UTC
  • Revision ID: khurshid.alam@linuxmail.org-20120406143838-nz7hjg8vtzi2wl7i
initial revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
"""
 
3
 
 
4
snipurl.com interface for Gwibber
 
5
macno (Michele Azzolari) - 02/13/2008
 
6
 
 
7
"""
 
8
 
 
9
import urllib2
 
10
 
 
11
PROTOCOL_INFO = {
 
12
 
 
13
  "name": "snipurl.com",
 
14
  "version": 0.1,
 
15
  "fqdn" : "http://snipr.com",
 
16
  
 
17
}
 
18
 
 
19
class URLShorter:
 
20
 
 
21
  def short(self, text):
 
22
    short = urllib2.urlopen("http://snipr.com/site/snip?r=simple&link=%s" % urllib2.quote(text)).read()
 
23
    return short
 
24