I downloaded source code from here. I tried to run the example from chapter 4 of the book 'Programming Collective Intelligence' by Toby Segaran. My python version is 2.7.2. I type in interpreter this code:
import searchengine
pages=['http://en.wikipedia.org/wiki/Programming_language']
crawler = searchengine.crawler('searchindex.db')
crawler.crawl(pages)
And get message:
Could not open http://en.wikipedia.org/wiki/Programming_language
Or sometimes get message:
Indexing http://en.wikipedia.org/wiki/Programming_language
Could not parse page http://en.wikipedia.org/wiki/Programming_language
In summary crawler doesn't index the page. What am I doing wrong?