2010-02-15 61 views
1

我已經建立了一個剽竊檢測應用程序,使用Google API和JavaScript工作正常,但它不能搜索時,搜索材料超過235字以上。請告訴我該怎麼做。如何增加谷歌搜索限制?

回答

0

您可以試試xgoogle Python lib

from xgoogle.search import GoogleSearch, SearchError 
try: 
    gs = GoogleSearch("quick and dirty") 
    gs.results_per_page = 50 
    results = gs.get_results() 
    for res in results: 
    print res.title.encode('utf8') 
    print res.desc.encode('utf8') 
    print res.url.encode('utf8') 
    print 
except SearchError, e: 
    print "Search failed: %s" % e 
+0

你能告訴我一個例子,我不知道如何使用xgoogle Python lib嗎? – Sheery

+0

已添加。如果你可以在瀏覽器中搜索那麼久,你可以用這個庫搜索它。 –