Popular recipes tagged "url" but not "web"http://code.activestate.com/recipes/tags/url-web/2014-11-09T11:19:07-08:00ActiveState Code RecipesPython Short URL Generator (Python)
2014-11-09T11:19:07-08:00Des Wagnerhttp://code.activestate.com/recipes/users/4191097/http://code.activestate.com/recipes/578961-python-short-url-generator/
<p style="color: grey">
Python
recipe 578961
by <a href="/recipes/users/4191097/">Des Wagner</a>
(<a href="/recipes/tags/deterministic/">deterministic</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/short/">short</a>, <a href="/recipes/tags/tiny/">tiny</a>, <a href="/recipes/tags/unique/">unique</a>, <a href="/recipes/tags/url/">url</a>).
</p>
<p>Python implementation for generating Tiny URL- and bit.ly-like URLs.</p>
Python Short URL Generator (Python)
2011-09-19T14:06:36-07:00Michael Foglemanhttp://code.activestate.com/recipes/users/4171845/http://code.activestate.com/recipes/576918-python-short-url-generator/
<p style="color: grey">
Python
recipe 576918
by <a href="/recipes/users/4171845/">Michael Fogleman</a>
(<a href="/recipes/tags/deterministic/">deterministic</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/short/">short</a>, <a href="/recipes/tags/tiny/">tiny</a>, <a href="/recipes/tags/unique/">unique</a>, <a href="/recipes/tags/url/">url</a>).
Revision 3.
</p>
<p>Python implementation for generating Tiny URL- and bit.ly-like URLs.</p>
slugify: make a string usable in a URL or filename (JavaScript)
2011-07-12T17:46:49-07:00Trent Mickhttp://code.activestate.com/recipes/users/4173505/http://code.activestate.com/recipes/577787-slugify-make-a-string-usable-in-a-url-or-filename/
<p style="color: grey">
JavaScript
recipe 577787
by <a href="/recipes/users/4173505/">Trent Mick</a>
(<a href="/recipes/tags/filename/">filename</a>, <a href="/recipes/tags/nodejs/">nodejs</a>, <a href="/recipes/tags/slug/">slug</a>, <a href="/recipes/tags/slugify/">slugify</a>, <a href="/recipes/tags/url/">url</a>).
Revision 2.
</p>
<p>"Slugify" a string so it has only alphanumeric and hyphen characters. Useful for URLs and filenames. This is a JavaScript (node.js too) version of <a href="http://code.activestate.com/recipes/577257/">Recipe 577257</a>.</p>
<p>Note: It is missing the guarantee that only ascii characters are passed through. I don't know an NFKD equivalent in JavaScript-land.</p>
Perl URL encode and decode (Perl)
2010-11-02T17:52:46-07:00Trent Mickhttp://code.activestate.com/recipes/users/4173505/http://code.activestate.com/recipes/577450-perl-url-encode-and-decode/
<p style="color: grey">
Perl
recipe 577450
by <a href="/recipes/users/4173505/">Trent Mick</a>
(<a href="/recipes/tags/decode/">decode</a>, <a href="/recipes/tags/encode/">encode</a>, <a href="/recipes/tags/url/">url</a>).
</p>
<p>URL encode and decode functions for Perl.</p>
slugify: make a string usable in a URL or filename (Python)
2010-06-07T04:11:55-07:00Trent Mickhttp://code.activestate.com/recipes/users/4173505/http://code.activestate.com/recipes/577257-slugify-make-a-string-usable-in-a-url-or-filename/
<p style="color: grey">
Python
recipe 577257
by <a href="/recipes/users/4173505/">Trent Mick</a>
(<a href="/recipes/tags/ascii/">ascii</a>, <a href="/recipes/tags/django/">django</a>, <a href="/recipes/tags/filename/">filename</a>, <a href="/recipes/tags/slug/">slug</a>, <a href="/recipes/tags/slugify/">slugify</a>, <a href="/recipes/tags/url/">url</a>).
Revision 2.
</p>
<p>"Slugify" a string so it is ascii, has only alphanumeric and hyphen characters. Useful for URLs and filenames. This is heavily based on the slugify in Django.</p>
<p>Note: presumes that you've <code>import re</code>d higher up in your module.</p>
Object id mask, against data spiders (Python)
2010-08-16T07:18:43-07:00Chaobin Tang (唐超斌)http://code.activestate.com/recipes/users/4174076/http://code.activestate.com/recipes/577359-object-id-mask-against-data-spiders/
<p style="color: grey">
Python
recipe 577359
by <a href="/recipes/users/4174076/">Chaobin Tang (唐超斌)</a>
(<a href="/recipes/tags/encryption/">encryption</a>, <a href="/recipes/tags/url/">url</a>).
Revision 4.
</p>
<p>A funny, simple, and efficient encrypt for an object ID. Always used against an unsolicited automated spider that scrawls your site to collect data.</p>
Random URL (JavaScript)
2010-03-25T16:07:54-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577143-random-url/
<p style="color: grey">
JavaScript
recipe 577143
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/random/">random</a>, <a href="/recipes/tags/url/">url</a>).
</p>
<p>Save this code as randomURL.html.
Everytime you open the file w/ a browser it will try to visit a random Internet page.
Unfortunately most random trials does not take you a browser renderable webpage.
I am open to ideas on how to make certain it finds a good webpage everytime.</p>
download a URL with a console progress meter (Python)
2008-10-08T05:05:12-07:00Trent Mickhttp://code.activestate.com/recipes/users/4173505/http://code.activestate.com/recipes/576530-download-a-url-with-a-console-progress-meter/
<p style="color: grey">
Python
recipe 576530
by <a href="/recipes/users/4173505/">Trent Mick</a>
(<a href="/recipes/tags/commandline/">commandline</a>, <a href="/recipes/tags/download/">download</a>, <a href="/recipes/tags/url/">url</a>).
</p>
<p>A little script/function to download a given URL with a console progress meter. Usage:</p>
<pre class="prettyprint"><code>python geturl.py <a href="http://example.com/downloads/bigfile.zip" rel="nofollow">http://example.com/downloads/bigfile.zip</a>
</code></pre>
<p>(This is from an <a href="http://mail.python.org/pipermail/python-list/2005-April/319818.html">old post to python-list</a>.)</p>