instagram_api_extractor#
Submodules#
Package Contents#
- class instagram_api_extractor.InstagramAPIExtractor#
Bases:
auto_archiver.core.ExtractorUses an subzeroid/instagrapi API deployment to fetch instagram posts data
# TODO: improvement collect aggregates of locations[0].location and mentions for all posts
- valid_url#
- setup() None#
- 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.
- call_api(path: str, params: dict) dict#
- cleanup_dict(d: dict | list) dict#
- download_profile(result: auto_archiver.core.Metadata, username: str) auto_archiver.core.Metadata#
- download_all_highlights(result, username, user_id, max_to_download: int) int#
- download_post(result: auto_archiver.core.Metadata, code: str = None, id: str = None, context: str = '') auto_archiver.core.Metadata#
- download_highlights(result: auto_archiver.core.Metadata, id: str) auto_archiver.core.Metadata#
- download_stories(result: auto_archiver.core.Metadata, username: str) auto_archiver.core.Metadata#
- download_all_posts(result: auto_archiver.core.Metadata, user_id: str, max_to_download: int) int#
- download_all_tagged(result: auto_archiver.core.Metadata, user_id: str, max_to_download: int) int#
- scrape_item(result: auto_archiver.core.Metadata, item: dict, context: str = None) dict#
receives a Metadata and an API dict response fetches the media and adds it to the Metadata cleans and returns the API dict context can be used to give specific id prefixes to media
- scrape_media(item: dict, context: str) tuple[dict, auto_archiver.core.Media, str]#