[wwwsearch-commits] r28757 - wwwsearch/mechanize/trunk/examples

jjlee at codespeak.net jjlee at codespeak.net
Tue Jun 13 21:34:50 CEST 2006


Author: jjlee
Date: Tue Jun 13 21:34:48 2006
New Revision: 28757

Modified:
   wwwsearch/mechanize/trunk/examples/pypi.py
Log:
Switch off robots handling in PyPI example to keep it working

Modified: wwwsearch/mechanize/trunk/examples/pypi.py
==============================================================================
--- wwwsearch/mechanize/trunk/examples/pypi.py	(original)
+++ wwwsearch/mechanize/trunk/examples/pypi.py	Tue Jun 13 21:34:48 2006
@@ -16,6 +16,10 @@
     # mechanize.Factory (with XHTML support turned on):
     factory=mechanize.DefaultFactory(i_want_broken_xhtml_support=True)
     )
+# Addition 2005-06-13: Be naughty, since robots.txt asks not to
+# access /pypi now.  We're not madly searching for everything, so
+# I don't feel too guilty.
+b.set_handle_robots(False)
 
 # search PyPI
 b.open("http://www.python.org/pypi")


More information about the wwwsearch-commits mailing list