我想建立一個以Udacity的python類開始的搜索引擎。 在我運行我的程序時,出現了一大堆其他錯誤。有人可以幫助我開始理解所有這些錯誤。建立一個搜索引擎
回溯(最近通話最後一個):
File "E:\Python codes\MySearchEngine.py", line 106, in <module>
crawl_web(startPage)
File "E:\Python codes\MySearchEngine.py", line 66, in crawl_web
linksToFollow = followLinks(toCrawl)
File "E:\Python codes\MySearchEngine.py", line 53, in followLinks
linkPageContent = get_page(link)
File "E:\Python codes\MySearchEngine.py", line 4, in get_page
page = urllib2.urlopen(page).read()
File "C:\Python27\lib\urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "C:\Python27\lib\urllib2.py", line 392, in open
protocol = req.get_type()
File "C:\Python27\lib\urllib2.py", line 254, in get_type
raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
自我的價值是什麼.__原創 – gefei
我是新人,不知道自我.__原創的意思。感謝您試圖幫助。我是新的python – Parousia