-
Notifications
You must be signed in to change notification settings - Fork 1
4. Methods
Javinator9889 edited this page Aug 12, 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 aTimeLimit
object.-
TimeLimit
defines possible time combinations for delimiting results.-
setDay(self)
, which will find results of the latest 24 hours. -
setWeek(self)
, which will find results of the latest 7 days. -
setMonth(self)
, which will find results of the latest month. -
setYear(self)
, which will find results of the latest year.
-
-
-
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 aLanguages
object.-
Languages
defines the user selected language for the results.-
show_languages(self)
: prints a list of the available languages. -
setLanguage(self, language: AvailableLanguages)
: saves the user language from AvailableLanguages object.-
AvailableLanguages
contains all the available languages that can be used.
-
-
-
-
withResultsAtCountry(self, country: Countries)
: defines the Country that the results must be located at. You must create aCountries
object.-
Countries
defines the user selected country.-
show_countries(self)
: prints a list of the available countries. -
setCountry(self, country: AvailableCountries)
: saves the user country from AvailableCountries object.
-
-
-
withSearchBetweenTwoDates(self, dates: Dates)
: defines a Date for delimiting the results. You must create aDates
object.-
Dates
defines one or two dates for delimiting the results.-
setFirstDate(self, day: int, month: int, year: int)
: sets the first date. -
setSecondDate(self, day: int, month: int, year: int)
: sets the second date.
-
-
-
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.-
InterfaceLanguages
contains all the available languages for the interface.
-
All the other methods are for some specific content or Google Page, so they will be defined at their correspondant site.