Skip to main content

A Python package for fetching media details from Instagram, TikTok, and other platforms.

Project description

Media Fetcher

A Python package for fetching media details from various platforms, including Instagram, TikTok, and more. It is designed to be lightweight, modular, and easy to integrate into other projects like Discord bots or web applications.

Features

  • Fetch metadata and media URLs for Instagram posts.
  • Fetch metadata and video URLs for TikTok posts.
  • Designed to support additional platforms in the future.
  • Lightweight and reusable.

Installation

Clone the repository and install the package manually using your preferred method, such as Poetry or pip.

Usage

Import Fetchers

Use the fetchers provided for supported platforms:

from media_fetcher.instagram import InstagramFetcher
from media_fetcher.tiktok import TikTokFetcher

Example: Fetch Instagram Post

url = "https://www.instagram.com/p/example/"
result = InstagramFetcher.fetch_post(url)
print(result)

Example: Fetch TikTok Video

url = "https://www.tiktok.com/@example/video/123456789"
result = TikTokFetcher.fetch_video(url)
print(result)

Output Example

All fetchers return a dictionary with the status and URL. For example:

{
"url": "https://www.instagram.com/p/example/",
"status": "Success"
}

Adding More Platforms

The package is designed to be extensible. To add support for more platforms, create a new fetcher module in the media_fetcher directory, following the existing structure.

License

This project is licensed under the Apache-2.0 License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

media_fetcher-0.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

media_fetcher-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file media_fetcher-0.1.0.tar.gz.

File metadata

  • Download URL: media_fetcher-0.1.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for media_fetcher-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d04390203a8e463758237949e6df51674bca82bf01a250c064765061cfa0c656
MD5 3a89d5810277871682256b0d7d442a82
BLAKE2b-256 d2a606cd8e64c8d5fd49b610cc60156dd5e6a9468df18c1eda11406a90e564a1

See more details on using hashes here.

File details

Details for the file media_fetcher-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: media_fetcher-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for media_fetcher-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29df37243d37986ce79b0deb17e84ed7e2838472dde42ce5a6565ba5a4226fc8
MD5 5bc8b96b772cad27266bef5b5cfa0ebc
BLAKE2b-256 f6b201047d0ee60bffc4b07ace0f902b98e6cf72100280e4452ca74e069a2137

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page