antibot_extractor_enricher.dropins.vk
=====================================

.. py:module:: antibot_extractor_enricher.dropins.vk




Module Contents
---------------

.. py:class:: VkDropin(sb: seleniumbase.SB, extractor: auto_archiver.core.Extractor)

   Bases: :py:obj:`auto_archiver.modules.antibot_extractor_enricher.dropin.Dropin`


   A class to handle VK drop-in functionality for the antibot extractor enricher module.


   .. py:attribute:: WALL_PATTERN


   .. py:attribute:: VIDEO_PATTERN


   .. py:attribute:: CLIP_PATTERN


   .. py:attribute:: PHOTO_PATTERN


   .. py:method:: documentation() -> Mapping[str, str]

      Each Dropin should auto-document itself with this method.
      Return dictionary can include:
      - 'name': A string representing the name of the dropin.
      - 'description': A string describing the functionality of the dropin.
      - 'site': A string representing the site this dropin is for.
      - 'authentication': A dictionary with authentication example for the site.




   .. py:method:: suitable(url: str) -> bool
      :staticmethod:


      Check if the URL is suitable for processing with this dropin.
      :param url: The URL to check.
      :return: True if the URL is suitable for processing, False otherwise.



   .. py:method:: sanitize_url(url: str) -> str
      :staticmethod:


      Transforms modal URLs like 'https://vk.com/page_name?w=wall-123456_7890' to 'https://vk.com/wall-123456_7890'



   .. py:method:: open_page(url) -> bool

      Make sure the page is opened, even if it requires authentication, captcha solving, etc.
      :param url: The URL to open.
      :return: True if success, False otherwise.



   .. py:method:: add_extra_media(to_enrich: auto_archiver.core.metadata.Metadata) -> tuple[int, int]

      Extract image and/or video data from the currently open post with SeleniumBase. Media is added to the `to_enrich` Metadata object.
      :return: A tuple (number of Images added, number of Videos added).



