<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Comments on snippet: 'Python make url address to Tinyurl'</title>
<link>http://snipplr.com</link>
<description>Snipplr comments feed'</description>
<language>en-us</language>
<pubDate>Sun, 19 May 2013 05:42:30 GMT</pubDate>
<item>
<title>sku said on 4/4/09</title>
<link>http://snipplr.com/view/7604/python-make-url-address-to-tinyurl/</link>
<description><![CDATA[ Well that didn't work to well. The important thing is `quoted = urllib.quote_plus(url) ` and `tinyurl = urllib.urlopen(apiurl + quoted).read()`. If you don't quote the url you'll have unexpected results (missing #s, etc). ]]></description>
<pubDate>Sat, 04 Apr 2009 00:59:17 GMT</pubDate>
<guid>http://snipplr.com/view/7604/python-make-url-address-to-tinyurl/</guid>
</item>
<item>
<title>sku said on 4/4/09</title>
<link>http://snipplr.com/view/7604/python-make-url-address-to-tinyurl/</link>
<description><![CDATA[ don't forget to quote the url:

`def tiny_url(url):
    """tinyurl GET"""
    apiurl = "http://tinyurl.com/api-create.php?url="
    quoted = urllib.quote_plus(url)
    tinyurl = urllib.urlopen(apiurl + quoted).read()
    return tinyurl ` ]]></description>
<pubDate>Sat, 04 Apr 2009 00:56:02 GMT</pubDate>
<guid>http://snipplr.com/view/7604/python-make-url-address-to-tinyurl/</guid>
</item>
</channel>
</rss>