Skip to content

4. Methods

Javinator9889 edited this page Aug 13, 2018 · 4 revisions

Here you have the list with the common methods to all Google Search pages, it is, which will work wit all types of search:

Note that the self attribute must not be specified while using the functions.

  • withQuery(self, query: str): defines the query string that is going to be searched at Google.
  • withWordsInSpecificOrderSearch(self, words: list): defines a list of words that will be searched at that order.
  • withOneOrMoreWordsInResult(self, words: list): defines a list of words that must be at the search result.
  • withExcludedWords(self, words: list): a list of words that must not appear at the search result.
  • withNumberOfResults(self, results: int = 10): defines an integer which determines the number of results.
  • withTimeLimit(self, time_limit: TimeLimit): defines a TimeLimit for searching only results at the specified time. You must create a TimeLimit object.
  • withTextInTitle(self, text: str): defines a text string with the words that must appear at the title of the result.
  • withTextInBody(self, text: str): defines a text string with the words that must appear at the body of the result.
  • withTextInUrl(self, text: str): defines a text string with the words that must appear at the URL of the result.
  • withTextInAnchor(self, text: str): defines a text string with the words that must appear at the anchor of the result.
  • withResultBetweenTwoNumbers(self, first_number: float, second_number: float): defines that the result must be between two float numbers.
  • withSynonymousSearchingToAWord(self, word: str): defines a word string to search also for synonyms to it.
  • withContainingTwoTerms(self, first_term: str, second_term: str): defines two string terms that must appear at the result.
  • withSafeModeActivated(self): enables safe mode.
  • withSafeModeDeactivated(self): disables safe mode.
  • withPersonalizedSearch(self): enables personalized search.
  • withNoPersonalizedSearch(self): disables personalized search.
  • withResultsLanguage(self, lang: Languages): defines the Language that the results must be displayed. You must create a Languages object.
  • withResultsAtCountry(self, country: Countries): defines the Country that the results must be located at. You must create a Countries object.
  • withSearchBetweenTwoDates(self, dates: Dates): defines a Date for delimiting the results. You must create a Dates object.
  • withSortByUpdateTime(self): sorts the results by the latest update time of each one.
  • withSearchStartPositionAt(self, index: int): show the results from the selected position.
  • withInterfaceLanguage(self, language: InterfaceLanguages): defines the interface language from an InterfaceLanguages object so some data will be at the chosen language.

All the other methods are for some specific content or Google Page, so they will be defined at their correspondant site.

<<< Previous page - Next page >>>