Skip to main content

A social media downloader and info fetcher

Project description

kaiiddo-dld

PyPI version License: MIT Python Versions

A Python package for downloading and fetching information from social media platforms. Currently supports Dailymotion, with extensible architecture for adding more platforms.

Note: This is an open source project. If in the future any social media platform's terms & conditions are violated, please reach out to us via email (hello.kaiiddo@example.com), and we will promptly remove that social media support from the package.

Features

  • Dailymotion Support: Fetch detailed video information including metadata, thumbnails, channel info, and statistics.
  • Extensible Design: Built with a base downloader class to easily add support for other social media platforms.
  • Rich Information Display: Formatted terminal output with emojis and structured data.
  • GraphQL API Integration: Uses Dailymotion's GraphQL API for efficient data retrieval.
  • Automatic Token Management: Handles OAuth token fetching and renewal automatically.

Installation

Install the package via pip:

pip install kaiiddo-dld

Requirements

  • Python >= 3.6
  • requests >= 2.25.0

Usage

Basic Example

from kaiiddo_dld.dailymotion import DailymotionDL

dl = DailymotionDL()
info = dl.fetch_info("https://www.dailymotion.com/video/x9gjomy")

Output Example

When you run the fetch_info method, you'll see formatted output like:

============================================================
🎬 DAILYMOTION VIDEO INFORMATION
============================================================
📹 ID: x8m8z5z
🔗 XID: x8m8z5z
📺 Title: Sample Video Title
⏱️ Duration: 05:23 (323 seconds)
🔄 Status: published
📅 Created: 2023-10-01 12:00:00
🎯 Best Quality: 1080p
📐 Resolution: 1920x1080
📊 Aspect Ratio: 1.7778

🖼️ THUMBNAILS:
  x60: https://s1.dmcdn.net/v/...
  x120: https://s1.dmcdn.net/v/...
  ...

👤 CHANNEL:
  📛 Name: Channel Name
  🔖 Username: channel_username
  🆔 Channel ID: x12345
  🧩 Account Type: user
  👁️ Channel Views: 1,234,567
  ❤️ Followers: 12,345
  📹 Videos: 67

📊 VIDEO STATS:
  👁️ Total Views: 89,012
  👍 Likes: 1,234

ℹ️ ADDITIONAL INFO:
  📝 Description: Video description here...
  🏷️ Category: entertainment
  🌐 Language: en
  📍 Country: US
  🔞 Explicit: No
  👶 For Kids: No
  🔒 Private: No
  📢 Ads Enabled: Yes
============================================================

API Reference

BaseDownloader

Base class for all social media downloaders.

  • __init__(): Initializes a requests session with default headers.
  • fetch_info(url): Abstract method to be implemented by subclasses.

DailymotionDL

Downloader for Dailymotion videos.

  • __init__(): Initializes with Dailymotion API credentials and endpoints.
  • fetch_info(url): Fetches and displays video information for a given Dailymotion URL.
  • extract_video_id(url): Extracts video ID from Dailymotion URL.
  • get_access_token(): Fetches OAuth access token from Dailymotion API.
  • setup_headers(): Sets up request headers with authentication.
  • display_video_info(data): Formats and prints video information to terminal.
  • format_duration(seconds): Converts seconds to HH:MM:SS format.
  • format_date(date_string): Formats ISO date string to readable format.

Supported Platforms

  • Dailymotion: Full support for video information fetching.

More platforms can be added by extending the BaseDownloader class.

Contributing

Contributions are welcome! If you encounter any issues or bugs, please open an issue at https://github.com/ProKaiiddo/kaiiddo-dld/issues.

For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Feature Requests: Tell us your favorite social media platforms, and we'll consider adding them in future versions!

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Aryan Rathod

Repository

https://github.com/ProKaiiddo/kaiiddo-dld


Note: This package is currently in alpha (v0.1.0). API may change in future versions.

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

kaiiddo_dld-0.1.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

kaiiddo_dld-0.1.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file kaiiddo_dld-0.1.1.tar.gz.

File metadata

  • Download URL: kaiiddo_dld-0.1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for kaiiddo_dld-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4d1c14514976f1494cf204aed0d8346b451744c7b37d5ebdf8b9b303531ae2a1
MD5 618f6d1e12098852105a4df21d058394
BLAKE2b-256 d6749e36090030ffc5d159c149cbc3991a28b4638c0a24411d554e39e0fcd861

See more details on using hashes here.

File details

Details for the file kaiiddo_dld-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: kaiiddo_dld-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for kaiiddo_dld-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 180ebe4bbe5d26b87bf676c46d63395ce50509884064cca4e7b57b4b8dd49201
MD5 9c9423f26afbcd67c00e31779a88ef39
BLAKE2b-256 c50bd0c640c919fe9ba3213fb5c33be8aec7281e9f1a37bfc020df8436e2fcc4

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