twitter_api_extractor.twitter_api_extractor#

Module Contents#

class twitter_api_extractor.twitter_api_extractor.TwitterApiExtractor#

Bases: 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.

valid_url: re.Pattern#
setup() None#
property api_client: str#
sanitize_url(url: str) str#

Used to clean unnecessary URL parameters OR unfurl redirect links

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.

get_username_tweet_id(url)#
download_retry(item: auto_archiver.core.Metadata) auto_archiver.core.Metadata#
choose_variant(variants)#

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