我正在使用xgoogle python库来尝试搜索特定站点。当我在关键字搜索中不使用“site:”指示符时,该代码适用于我。如果我使用它,结果集是空的。有没有人有任何想法如何让下面的代码工作?Python xgoogle库 - 特定于站点的搜索
from xgoogle.search import GoogleSearch, SearchError
gs = GoogleSearch("site:reddit.com fun")
gs.results_per_page = 50
results = gs.get_results()
print results
for res in results:
print res.title.encode("utf8")
print
这可能是原因:[Xgoogle Python库不再工作](http://stackoverflow.com/questions/7279934/xgoogle-python-library-is-not-working-any-more) –