ghostarchive_enricher
=====================

.. py:module:: ghostarchive_enricher


Submodules
----------

.. toctree::
   :maxdepth: 1

   /autoapi/ghostarchive_enricher/ghostarchive_enricher/index




Package Contents
----------------

.. py:class:: GhostarchiveEnricher

   Bases: :py:obj:`auto_archiver.core.Enricher`


   Submits the current URL to Ghost Archive (ghostarchive.org) for archiving
   and stores the archived page URL as enrichment metadata.

   Ghost Archive has no official API — this module interacts with the web form
   and parses HTML responses. The submission endpoint is protected by Cloudflare,
   so a headless browser (SeleniumBase) is used for archival submissions, while
   plain HTTP requests are used for searching existing archives.

   Note: this module only confirms that Ghost Archive accepted the submission
   and returned an archive URL. It does not verify that the archived page
   content is complete or correctly rendered.


   .. py:attribute:: GHOSTARCHIVE_BASE
      :value: 'https://ghostarchive.org'



   .. py:attribute:: ARCHIVE_ENDPOINT
      :value: 'https://ghostarchive.org/archive2'



   .. py:attribute:: SEARCH_ENDPOINT
      :value: 'https://ghostarchive.org/search'



   .. py:attribute:: ARCHIVE_URL_PATTERN


   .. py:method:: enrich(to_enrich: auto_archiver.core.Metadata) -> bool

      Enriches a Metadata object with additional information or context.

      Takes the metadata object to enrich as an argument and modifies it in place, returning None.



