twitter_api_extractor
=====================

.. py:module:: twitter_api_extractor


Submodules
----------

.. toctree::
   :maxdepth: 1

   /autoapi/twitter_api_extractor/twitter_api_extractor/index




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

.. py:class:: TwitterApiExtractor

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


   Base class for implementing extractors in the media archiving framework.
   Subclasses must implement the `download` method to define platform-specific behavior.


   .. py:attribute:: valid_url
      :type:  re.Pattern


   .. py:method:: setup() -> None


   .. py:property:: api_client
      :type: str



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

      Used to clean unnecessary URL parameters OR unfurl redirect links



   .. py:method:: download(item: auto_archiver.core.Metadata) -> auto_archiver.core.Metadata

      Downloads the media from the given URL and returns a Metadata object with the downloaded media.

      If the URL is not supported or the download fails, this method should return False.




   .. py:method:: get_username_tweet_id(url)


   .. py:method:: download_retry(item: auto_archiver.core.Metadata) -> auto_archiver.core.Metadata


   .. py:method:: choose_variant(variants)

      Chooses the highest quality variable possible out of a list of variants



