From 7d4e1a9cac457c481e57b2e2e6f341b21288e05c Mon Sep 17 00:00:00 2001 From: Rahul Date: Wed, 12 Oct 2022 19:06:46 +0530 Subject: [PATCH 1/2] Update README.md --- scripts/fetching_system_information/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/fetching_system_information/README.md b/scripts/fetching_system_information/README.md index 094b4f0..d4e6d86 100644 --- a/scripts/fetching_system_information/README.md +++ b/scripts/fetching_system_information/README.md @@ -1,6 +1,8 @@ # Fetching System Information This is a simple script that fetches system information for your system.(Windows) +## Improvements +Script for fetching all systems information ## Usage 1. Clone the repo 2. Run python script.py \ No newline at end of file From 53b51676ee399e4925f9ccb29adf569092e93890 Mon Sep 17 00:00:00 2001 From: Rahul Date: Wed, 12 Oct 2022 21:15:13 +0530 Subject: [PATCH 2/2] Added script for fetching Youtube channel info --- scripts/youtube_channel_info/README.md | 8 ++++++++ scripts/youtube_channel_info/script.py | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 scripts/youtube_channel_info/README.md create mode 100644 scripts/youtube_channel_info/script.py diff --git a/scripts/youtube_channel_info/README.md b/scripts/youtube_channel_info/README.md new file mode 100644 index 0000000..1cb7017 --- /dev/null +++ b/scripts/youtube_channel_info/README.md @@ -0,0 +1,8 @@ +# Youtube Channel Info +This is a simple script that fetches info about a youtube channel. + +## Usage +- Clone the repo +- download the requirements +- add the api key and channel id +- run python script.py diff --git a/scripts/youtube_channel_info/script.py b/scripts/youtube_channel_info/script.py new file mode 100644 index 0000000..4c3f14a --- /dev/null +++ b/scripts/youtube_channel_info/script.py @@ -0,0 +1,18 @@ +from googleapiclient.discovery import build + +youtube = build('youtube', 'v3', + developerKey='Enter API key') + +ch_request = youtube.channels().list( + part='statistics', + id='Enter Channel ID') + +ch_response = ch_request.execute() + +sub = ch_response['items'][0]['statistics']['subscriberCount'] +vid = ch_response['items'][0]['statistics']['videoCount'] +views = ch_response['items'][0]['statistics']['viewCount'] + +print("Total Subscriber:- ", sub) +print("Total Number of Videos:- ", vid) +print("Total Views:- ", views)