Introduction
The google module is a python interface of the google search engine. It uses urllib2 to search on google and BeautifulSoup to explain external encapsulation. It is not an official google interface.
Function: Google search engine python interface type: External module current version: 1.0.5 (view date ):? Https://pypi.python.org/pypi/google monthly downloads: around 10 thousand platform: cross-platform related modules: BeautifulSoup? It is strongly recommended that an html interpreter be downloaded for about 0.2 million characters per month.
Installation Method:
# tar xzvf setuptools-2.0.tar.gz# cd setuptools-2.0# python setup.py install# easy_install pip# pip install BeautifulSoup# pip install google
Use
>>> from google import search>>> for url in search('python', tld='com.hk', lang='cn', stop=2):... print(url)... http://www.python.org/http://www.python.org/getit/http://www.python.org/doc/http://www.python.org/getit/releases/3.3.2/http://www.python.org/getit/releases/2.7.5/http://zh.wikipedia.org/zh-hk/Pythonhttp://zh.wikipedia.org/wiki/PyPyhttp://zh.wikipedia.org/wiki/%E5%8D%B3%E6%99%82%E7%B7%A8%E8%AD%AFhttp://zh.wikipedia.org/wiki/%E5%90%89%E5%A4%9A%C2%B7%E8%8C%83%E7%BD%97%E8%8B%8F%E5%A7%86http://zh.wikipedia.org/wiki/CPythonhttp://en.wikipedia.org/wiki/Python_(programming_language)http://python.org.tw/http://en.wikipedia.org/wiki/Burmese_pythonhttp://en.wikipedia.org/wiki/Python_regiushttp://news.nationalgeographic.com/news/2005/10/1006_051006_pythoneatsgator.htmlhttp://www.animalpeoplenews.org/anp/2013/10/26/alligators-pigs-pythons-the-reptilian-ploy-to-resuscitate-sport-hunting/http://kidfocused.com/mom-wakes-to-python-wrapped-around-toddler/http://www.codecademy.com/tracks/pythonhttp://openhome.cc/Gossip/Python/http://pythonline.com/http://learnpythonthehardway.org/book/http://www.learnpython.org/
Search (query, tld = 'com', lang = 'en', num = 10, start = 0, stop = None, pause = 2.0): search string query using Google. The returned result is a generator. The parameters are as follows:
Delete the following parts. For more information, see the original address below.
At http://automationtesting.sinaapp.com/blog/m_googlereference? Https://pypi.python.org/pypi/google
?