Skip to main content

K-Pop Tech: How to Get Youtube Views via Youtube API using Google Sheet + Google Script

Mass streaming has been one of the key trends in K-pop for a while now. Some people hate the idea of streaming for numbers, while others love knowing they have streaming goals and streaming parties. It's one of the little things K-pop fans still argue about.

As for me, I belong to the first group. I don't really feel good about simply playing a video and leaving it in the background just so it will increase the numbers. Also, do streaming parties actually work? It's not just the fans, but the general public (GP) also plays a part in the majority of the streams. How do we make sure that when we achieve these goals, it's really because of the fandom?

Another thing is that, if you admin a fanbase imagine how it's like when you have to get all sorts of streaming data all by yourself manually. We're not just talking about 1 video here, but possibly the entire artists' discography.

My idea
I want to see if streaming parties actually work so I can warm up to its idea, and try to get data quicker by code. I have to track the number of views during periods where there are no streaming parties and compare it to periods when there are. 

My solution
I want to use Google Sheet, Google Script, and Youtube API to track the streaming data. How it will be done:
  1. Get the list of videos I want to track data on
  2. Use Youtube API and Google script to fetch video statistics (such as views)
  3. Put the video statistics in Google Sheet
  4. Update video statistics data daily using triggers
The main reason why I selected these is that Google Sheets offers a tabular view of the data I'm going to retrieve and that Google Script comes with a scheduled trigger. I think I can achieve the same trigger-like functionality using Docker if I did go for maybe Python or Ruby? But I'm not really familiar with it yet.

Retrieve YouTube data using Google Script
Retrieve YouTube data using Google Script

In the next part, I'll show you how I do it.






Popular posts from this blog

Reframing how I identify bug root causes

It's been more than a year now since I've set up our bug tracking in JIRA. In there, I've set up an Issue Root Cause custom field where it had the following options: Incorrect coding Unclear / Missing / Incorrect Requirements Unclear / Missing / Incorrect Design Insufficient / Duplicated / Incorrect Testing Deployment Issue Environment Third-party issue My thoughts when I listed these as options is so that it would be easy to identify which team is responsible for the cause why we had that bug. They're pretty straightforward -  Incorrect coding  is of course when the developers didn't follow the expectations,  Unclear / Missing / Incorrect Requirements is because there's a gap in the requirement, and so on. And also, it's because that was the way it's done in my previous company so that's also my initial knowledge source. Recently, I've been reading a few articles regarding Shift Left, reducing silos, and generally how quality is a team activit...

QA Tools: Custom Test Case Generator in Google Sheet using Google App Script

When testers have to document test cases, it's usually done in the traditional format of putting all your test cases and steps in one sheet. Once it accumulates, for me it can be overwhelming to look at. It looks something like this: As a solution, I decided to make a tool that will help me focus on only drafting my test scenarios and look at my test cases one at a time. I'd like to share this here with everyone else who's like me. Hopefully, it can make your testing journey even a little better. Test Case Generator Tool This tool is for QA or non-QAs who need to write test cases. What it can do: Write your test scenarios in one tab Focus on writing steps for each test case one sheet at a time Generate an import file Generate a test execution document Sample test execution document: Scroll to the bottom to see how it works. Sheet Purpose Test Scenarios This is where you set the details for this test set/the project/story/epic where you're creating the test cases u...

A Bug's Life! Defect Management Process in Software Testing

First things first, what does a "bug" mean in the software development process? A bug is what we call a behavior that is different from what's expected based on the provided requirements. A tester's main purpose is to find and report bugs in the system as early as possible. In some companies, it's sometimes called a "defect". They actually mean slightly different if we go by the book. In this post, I'll be covering the lifecycle of a software bug which are issues that are found during the development phase. You're testing the system and you found a bug. What is the first thing you do? a) You immediately write a bug report b) You try to reproduce it c) You complain "How could this very obvious bug reach QA? Dev should've spotted this earlier ugh." The formal answer is B (I'll just let you figure out what's the informal answer), It's common for a QA to be gaslighted. "I cannot reproduce this bug.", "It doesn...