Revision: 12503
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 17, 2009 15:55 by tamuratetsuya
Initial Code
def checkWiki(word): if word != '': url = 'http://ja.wikipedia.org/wiki/'+urllib.quote(word.encode('utf-8')) #getHtml=unicode(urlfetch.fetch(url).content,'cp932') getHtml=urlfetch.fetch(url).content html_analyzed = BeautifulSoup(getHtml) for node in html_analyzed.findAll('div', {'class': 'plainlinks'}): #print >>sys.stderr,'node=%s'%node('b')[0](text = True)[0] if node('b')[0](text = True)[0].find(u'ã‚ã‚Šã¾ã›ã‚“')==-1: print >>sys.stderr,'yes' return 1 else: print >>sys.stderr,'ng' return 0 return 1 else:return 0
Initial URL
Initial Description
Initial Title
wikipediaã«å˜èªžãŒã‚ã‚‹ã‹ã©ã†ã‹ã®ãƒã‚§ãƒƒã‚¯
Initial Tags
google, python, django
Initial Language
Python