.. _fetcher: ############## Fetching logic ############## The functionality explained in this section is mostly implemented in the source code file `Fetcher.java `_. ***************** Low-level methods ***************** .. _getting_a_html_document: Getting a HTML document ======================= Fetching HTML (or XML) resources for both :ref:`publications ` and :ref:`webpages `/:ref:`docs ` is done in the same method, where either the `jsoup `_, `HtmlUnit `_ or `Selenium WebDriver `_ libraries are used for getting the document. The HtmlUnit and Selenium libraries have the advantage of supporting JavaScript, which needs to be executed to get the proper output for many sites, and they also work for some sites with problematic SSL certificates. As a disadvantage, it is a lot slower than jsoup, which is why using jsoup is the default and HtmlUnit/Selenium is used only if JavaScript support is requested (or switched to automatically in case of some SSL exceptions or if a :ref:`webpage ` without :ref:`scraping rules ` seems to require JavaScript based on -\-:ref:`webpageMinLengthJavascript ` or the presence of ``