Skip to content

Patch to support multiple google sites #2

@MarioVilas

Description

@MarioVilas

Found in a comment in the blog: http://www.catonmat.net/c/3011


Simple hack to use more than one google...

In the tool I am developing I needed to be able to input different google's to search so i came up with this simple hack

class GoogleSearch(object):
....
def init(self, query, tld, random_agent=False, debug=False, lang="en", re_search_strings=None):
self.query = query
self._tld = tld
You can then specify a different google by typing

GoogleSearch("keywords", tld="co.uk")


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions