Skip to main content

:small_red_triangle: AYTCH - Async YouTube Channels Scrapper :small_red_triangle:

Logo

AYTCH is a Python library for extracting information about YouTube channels. It uses AIOHTTP library for best performance and concurrent fetching support. Library very lightweight (11KB) and return only extra nessesary information about any youtube channel.

:pencil2: Installation

You can install AYTCH using pip:

pip install aytch

:bookmark_tabs: Usage

Here's an example of how to use AYTCH to get information about a YouTube channel:

import asyncio
from aytch import get_channel_info

async def main():
    channel_url = 'https://www.youtube.com/channel/UCdX9ulb8u0oUf8pUzg9Z5Jw'
    channel_info = await get_channel_info(channel_url)
    print(channel_info)

asyncio.run(main())

:link: API

get_channel_info(
    channel_url: str, 
    lang: 'en' | 'ru' = 'en'
) -> dict

Retrieves information about a YouTube channel.

Parameters:

  • channel_url (str): The URL of the YouTube channel to get information about.
  • lang (str): The language of the YouTube page. Can be either 'en' or 'ru'. Defaults to 'en'.

Returns:

A dictionary containing the following information about the channel:

  • author (str): The name of the channel's author.
  • author_id (str): The external ID of the channel's author.
  • author_url (str): The URL of the channel's author.
  • author_thumbnail (str): The URL of the channel's author's thumbnail image.
  • subscriber_count (int): The number of subscribers to the channel.
  • description (str): The description of the channel.
  • view_count (str): The total number of views on the channel.

Example:

{
    'author': 'The Slow Mo Guys',
    'author_id': 'UCUK0HBIBWgM2c4vsPhkYY4w',
    'author_url': 'https://www.youtube.com/channel/UCUK0HBIBWgM2c4vsPhkYY4w',
    'author_thumbnail': 'https://yt3.ggpht.com/ytc/AAUvwnhRnI8Lr...',
    'subscriber_count': 14500000,
    'description': 'The best slow motion on Youtube.  \n\nWe shoot all of our...',
    'view_count': '265308911'
}

:recycle: Contributing

Contributions to aytch are welcome! If you'd like to contribute, please fork the repository and make a pull request.

:warning: License

aytch is licensed under the MIT License. See LICENSE for more information.

Inspired by yt-channel-info

Metadata

Release files for aytch 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aytch 0.1.1
File Size Uploaded
aytch-0.1.1.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aytch 0.1.1
File Interpreter ABI Platform
aytch-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.3 kB

Release files / aytch-0.1.1.tar.gz

Download URL aytch-0.1.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
704b10b9fdf987a5ec70549c34f1e638d2e566d9903623b653b221b17ed92d78
BLAKE2b-256 checksum
How to use checksums
7c5eeb27255eeec0e2c54147722152d52136f4950499aef2576ff6e01c697b31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.2 Linux/5.15.0-1037-azure

Release files / aytch-0.1.1-py3-none-any.whl

Download URL aytch-0.1.1-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13fa672ce1e0fb8ff57c460cdb74cb48cd853737698e749fdd0a342f5c2fb299
BLAKE2b-256 checksum
How to use checksums
35361d9e07beb443a60128b074a68ea67fd85c296e709d92b03f6ae117c9d111
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.2 Linux/5.15.0-1037-azure

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page