omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. Maik239

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Controversial 0
    • Groups 0

    Maik239

    @Maik239

    0
    Reputation
    532
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Maik239 Unfollow Follow

    Latest posts made by Maik239

    • PLS Help: Bitly URL Shortener

      Hi, I try me on my first snippet of Pythonista, but need some more help.

      I have following code already, but that still does not work. Help me someone?

      <code>import clipboard
      import urllib
      import urllib2

      kurzurl = clipboard.get()

      def shorten_url(long_url):
      username = 'USERNAMW'
      apikey = 'APIKEY'
      bitly_url = "http://api.bit.ly/v3/shorten?login={0}&apiKey={1}&longUrl={2}&format=txt"
      req_url = urlencode(bitly_url.format(username, apikey, long_url))
      short_url = urlopen(req_url).read()
      return short_url

      print shorten_url('kurzurl')</code>

      posted in Pythonista
      Maik239
      Maik239