Class SearchExtractor

    • Method Detail

      • getSearchString

        public java.lang.String getSearchString()
      • getSearchSuggestion

        @Nonnull
        public abstract java.lang.String getSearchSuggestion()
                                                      throws ParsingException
        The search suggestion provided by the service.

        This method also returns the corrected query if isCorrectedSearch() is true.

        Returns:
        a suggestion to another query, the corrected query, or an empty String.
        Throws:
        ParsingException
      • getName

        @Nonnull
        public java.lang.String getName()
        Description copied from class: Extractor
        Get the name
        Specified by:
        getName in class Extractor
        Returns:
        the name
      • isCorrectedSearch

        public abstract boolean isCorrectedSearch()
                                           throws ParsingException
        Tell if the search was corrected by the service (if it's not exactly the search you typed).

        Example: on YouTube, if you search for "pewdeipie", it will give you results for "pewdiepie", then isCorrectedSearch should return true.

        Returns:
        whether the results comes from a corrected query or not.
        Throws:
        ParsingException
      • getMetaInfo

        @Nonnull
        public abstract java.util.List<MetaInfo> getMetaInfo()
                                                      throws ParsingException
        Meta information about the search query.

        Example: on YouTube, if you search for "Covid-19", there is a box with information from the WHO about Covid-19 and a link to the WHO's website.

        Returns:
        additional meta information about the search query
        Throws:
        ParsingException