Class AbstractSimpleParser

  • Direct Known Subclasses:
    BitchuteParser

    public abstract class AbstractSimpleParser
    extends Object
    Interface providing all necessary methods for extractor.
    Author:
    Karafra.
    • Constructor Detail

      • AbstractSimpleParser

        public AbstractSimpleParser()
    • Method Detail

      • extract

        public abstract DownloadPageProps extract​(String linkToVideo)
                                           throws IOException
        Extracts raw link from given link
        Parameters:
        linkToVideo - link from which raw is to be extracted
        Returns:
        raw link.
        Throws:
        IOException
      • get

        public org.seimicrawler.xpath.JXDocument get​(String urlString)
        Connects to URL, used to avoid duplicate calls.
        Parameters:
        urlString - url to connect to
        Returns:
        Established connection.
      • getElementByXpath

        public org.jsoup.nodes.Element getElementByXpath​(String xpath)
        Gets element by xpath and and throws exception if xpath does not exist in DOM.
        Parameters:
        xpath - xpath to search for.
        Returns:
        element with given xpath.