{"id":15201735,"url":"https://github.com/sanjaydevtech/ytchannel","last_synced_at":"2026-02-10T00:31:27.948Z","repository":{"id":57478073,"uuid":"254805771","full_name":"SanjayDevTech/YTchannel","owner":"SanjayDevTech","description":"YouTube channel details extractor","archived":false,"fork":false,"pushed_at":"2020-04-25T15:12:17.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T22:18:40.704Z","etag":null,"topics":["module","python","youtube","youtube-api","youtube-api-v3","youtube-channel"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/YTchannel/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SanjayDevTech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["https://imjo.in/3r2FTY"]}},"created_at":"2020-04-11T06:17:03.000Z","updated_at":"2022-08-06T10:20:03.000Z","dependencies_parsed_at":"2022-09-18T19:01:00.275Z","dependency_job_id":null,"html_url":"https://github.com/SanjayDevTech/YTchannel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanjayDevTech%2FYTchannel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanjayDevTech%2FYTchannel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanjayDevTech%2FYTchannel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanjayDevTech%2FYTchannel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SanjayDevTech","download_url":"https://codeload.github.com/SanjayDevTech/YTchannel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241928576,"owners_count":20043838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["module","python","youtube","youtube-api","youtube-api-v3","youtube-channel"],"created_at":"2024-09-28T03:22:03.052Z","updated_at":"2026-02-10T00:31:27.903Z","avatar_url":"https://github.com/SanjayDevTech.png","language":"Python","readme":"# YTchannel\nYouTube channel \u0026 video details extractor\n\n## Features\nRetrieve:-\n- Youtube Video downloader\n- Youtube Channel details\n- Youtube Video details\n\n## Requirements\nYou need to install requests module\n```\npip install requests\n```\n\n## Installation\n```\npip install YTchannel\n```\n\n## Importing\n```python\nimport YTchannel as yt\n```\n\n\n## To Download Videos\n```python\ndownload = yt.YTdownloader()\n```\n#### Initialize video extraction\n```python\ntry:\n  download.startDownload(video_url=video_url,video_id = video_id)\nexcept KeyError:\n  #Invalid video id\nexcept ConnectionError:\n  #Connection error\nexcept IndexError:\n  #Can't find video\nexcept:\n  #Something went wrong\n```\n#### Get Result\n```python\nresult = download.getResults()\n```\n\n\n## For Channel details\n```python\nchannel = yt.Channel()\n```\n#### Calling with a Id and API key\nThe first parameter must be the Channel id\nCheck below example\nhttps://www.youtube.com/channel/UC_channel_id\nhere in this example the channel id is **UC_channel_id**\n```python\ntry:\n  channel.startChannel(UC_channel_id,YOUR_API_KEY)\nexcept KeyError:\n  #Invalid channel id\nexcept ConnectionError:\n  #Connection error\nexcept:\n  #Something went wrong\n```\n#### Check if the request is success\n```python\nresult = channel.getChannel() #this will return all details in a dictionary\nif result['result'] == 'OK':\n  #No problem do your thing\nelse:\n  #Something wrong like - no channel found or invalid api key\n  #use result['code'] to get the error code or result['message'] to know the message\n```\n#### How to get details\n```python\nprint(result) #this will print all the details of a channel in a dictionary\n```\n\n\n## For video details\n```python\nvideo = yt.Video()\n```\n#### Calling with a Id and API key\nThe first parameter must be the video id or video_url\nCheck below example\nhttps://www.youtube.com/watch?v=video_id\nhere in this example the video id is **video_id**\n```python\ntry:\n  video.startVideo(video_url=video_url,video_id = video_id,YOUR_API_KEY)\nexcept KeyError:\n  #Invalid video id\nexcept ConnectionError:\n  #Connection error\nexcept:\n  #Something went wrong\n```\n#### Check if the request is success\n```python\nresultVideo = video.getVideo() #this will return all details in a dictionary\nif resultVideo['result'] == 'OK':\n  #No problem do your thing\nelse:\n  #Something wrong like - no video found or invalid api key\n  #use resultVideo['code'] to get the error code or resultVideo['message'] to know the message\n```\n#### How to get details\n```python\nprint(resultVideo) #this will print all the details of a video in a dictionary\n```\n\n## Any issues?\nCreate an issue on github\n\n## Contact me\n- On twitter https://twitter.com/SanjayDevTech\n\n\n# **Happy coding**\n\n","funding_links":["https://imjo.in/3r2FTY"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjaydevtech%2Fytchannel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanjaydevtech%2Fytchannel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjaydevtech%2Fytchannel/lists"}