Skip to content

A tool to detect runs with unviewable (deleted/private/expired) YouTube and Twitch for a given game in speedrun.com

License

Notifications You must be signed in to change notification settings

GMPranav/SRCDVD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SRCDVD

SRCDVD (speedrun.com Deleted Video Detector) is a tool to detect runs with unviewable (deleted/private/expired) YouTube and Twitch VODs for a given game in speedrun.com

What this tool does exactly:

This tool makes use of speedrun.com's REST API to gather the data of all the verified runs of a given game and stores it in a file named "data.txt", but the most important detail we would be needing is the video links of each run, which is isolated from "data.txt" and stored in "links.txt". It then checks for all the youtube links and twitch links in "links.txt" and gets the IDs of each VOD and checks its availability using Google API v3 and Twitch API respectively. It then compares the IDs returned by the API to the original list to get the list of missing runs. It search for the ID in data.txt to find the src links to the appropriate runs, which is stored in "missinglinks.txt". You can skip either of YouTube or Twitch checks by tying skip instead of rhe respective authentication details.

Prerequisites:

The google and twitch APIs require authentication to use, so you will have to get your authentication details first. I will try to explain the process of doing so briefly. It might look complicated, but do not worry.

Google API v3

  • First, you have to create a project in google dev console. Here is a handy link - https://console.cloud.google.com/projectcreate

  • I will name it "Example" for demo purposes. Also, you don't need to select any organisation
    image

  • Now in the sidebar, go to APIs & Services > Library
    image

  • In the library, seach "youtube" and click on "YouTube Data API v3"
    image

  • Click "Enable"
    image

  • You will be redirected to a page about the overview of YouTube API usage by your project. Click on "Create Credentials"
    image

  • In the next screen, select "YouTube Data API v3" as the Credential Type and select "Public Data" under "What data will you be accessing?" and click "Next"
    image

  • You will get your API Key, copy it and paste it somewhere like notepad, and click "Done"
    image

  • Now you can close your project page and never worry about it again. There are some limtations like quota, etc. to prevent abuse but it's high enough that you won't feel it for any practical uses. If your game only has YouTube links, you can skip the next section about Twitch API and go ahead to use the tool.

Twitch API

  • First, you have to create an application in twitch dev console. Here is a handy link - https://dev.twitch.tv/console/apps/create

  • I will name it "SRCDVD" for demo purposes. Set the OAuth Redirect URL to "http://localhost", Category as "Analytics Tool" and click "Create"
    image

  • Click on "Manage" beside your application in the next page
    image

  • You will see a field called "Client ID" and also an option to create a "New Secret". Click on it. Now you will have both an ID and a secret, you can close your twitch dev console page for good. If you need later, you know where to find your ID and secret
    image

How to use the program:

  • Download the latest release - https://github.com/GMPranav/SRCDVD/releases/download/v1.0/main.exe (non-Windows users can download the code directy and exucute main.py through python)

  • I would advise keeping the executuable in a seperate folder.

  • Run the program. Enter the your Twitch Client ID and secret and then your Google API key.

  • Enter the game's abbreviation in speedrun.com. For example, for Prince of Persia, it is "pop1".
    image
    image

  • After entering it will take a while especially for games with a lot of runs, so please be patient.

  • Once the program has finished running, all the links of affected runs should be stored in a file called "missinglinks.txt".

Purpose of this tool and disclaimers:

The primary purpose of this tool is for the moderators of the game to keep track of the runs without viewable VODs. A lot of games have a "video must" rule so this might be helpful for potentially rejecting the runs. Before doing so, please manually check if the video is indeed unplayable. This tool or its creator is not responsible for falsely rejected runs. One more thing - If a youtube video is private rather than deleted (you can tell if you open the embed in a new tab), try contacting the owner to make it unlisted/public first, they can do so in a single click and probably better than rejecting the run. At the end of the day its your decision and I just want to say I am not responsible for it.

About

A tool to detect runs with unviewable (deleted/private/expired) YouTube and Twitch for a given game in speedrun.com

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages