A frontend for the InnerTube/YouTubeI API

Overview

Hitchhiker InnerTube Frontend

A frontend for the InnerTube/YouTubeI API, designed after YouTube's 2013 Hitchhiker. Written in PHP 7. Heavily work in progress, I do not recommend use at the moment.

A disclaimer

I am a person with my own personal life. As such, updates may be rare. This is just a passion project, and I suggest you follow the development of Nightlinbit and aubymori's similar project on /r/OldYouTubeLayout.

If you want to make pull requests of your own, please go ahead. I am not the best at PHP and that will show in the quality of my code.

Current bugs I'm aware of

The following issues are already acknowledged, and probably will be patched in a later release.

  • No player (I need to research player init, if you can contact Reprety/V3 Developer, please send him /u/YukisCoffee. Thank you <3)
  • Video and subscription counts display as 0 on watch. These simply are hardcoded placeholder values until the proper code is written.
  • Missing category in video descriptions (needs player API, which currently isn't requested).
  • Watch doesn't acknowledge being signed in.
  • Logged out guide may sometimes display a duplicate channel.
  • Expanded masthead playlists bar doesn't work (I got sent the resources necessary, so implementation should come eventually).
  • Subscriptions cannot be sorted (new API issue, will look into workarounds).
  • Home may occasionally display a null video. Seems like stricter checks need to be implemented.
  • All the missing pages (oops lol)
  • Just about everything else.

Installation

Currently, this has only been tested on my personal Windows 10 PC running PHP 7.4. You may encounter issues if you're using a different OS or are just not me. Please report these to me using the issues tab so that I may fix them (please specify OS/version, PHP version/configuration, and software used).

You need PHP 7+ and a webserver. I recommend XAMPP. Composer packages are currently bundled with the project, however I suggest you install that as well.

Finally, getting it onto www.youtube.com: it may be possible to get it working with OS-native hosts file, however at the moment, you need external software that proxies it back to the domain:

Fiddler Classic Configuration

Don't use Fiddler Everywhere. It sucks.

Enable decryption of HTTPS traffic (from browsers only), then set up an AutoResponder rule that redirects REGEX:https://www.youtube.com/(.*) to http://127.0.0.1/$1 and tick the box that allows unmatched request passthrough. If you then want to hide Fiddler from view, then press CTRL+M. Fiddler will be accessible in the system tray.

I recommend using Fiddler Classic if you're on Windows, because it uses less RAM than Charles and it's more user-friendly than mitmproxy.

Charles Configuration

Enable SSL proxying and install the root certificate in your browser, then go to "Map Remote" and add a rule to redirect host www.youtube.com to http://127.0.0.1. If you then want to hide Charles from view, press CTRL+, to open "Preferences", then click "Minimise to system tray".

mitmproxy Configuration

You really got yourself into a mess, huh?

import mitmproxy.http
        
class HitchhikerFrontendRedirect:
    def __init__(self):
        print("Hitchhiker Frontend Redirect active")
    
    def request(self, flow: mitmproxy.http.HTTPFlow):
        if "www.youtube.com" in flow.request.pretty_host:
            flow.request.host = "127.0.0.1"
            flow.request.port = 80
            flow.request.scheme = "http"
    
addons = [ HitchhikerFrontendRedirect() ]

But wait! There's more. mitmproxy doesn't allow this on HTTP 2 hosts, meaning you need to pass the --no-http2 argument. Additionally, it likes to break WebSocket traffic, which was a common complaint levied against it in the GoodTube Discord server when that was around (it broke Discord image uploads), so you need to pass a TCP passthrough regex that ignores WS traffic. As such, I concocted this launch command just for you mitmproxy users:

mitmdump -s YOUR_PYTHON_FILE.py --no-http2 --tcp !(www.youtube.com)

Note that on Windows, the command is mitmdump. On Unix systems, this will be mitmproxy instead. Otherwise, the launch command should be the same.

I tested this with Discord image uploading, and it seems to work as it should. Please make an issue if problems arise.

Hostsfile Configuration

Too badass for mitmproxy? Give hostsfile a try!

I did all the work for you, actually. The requests library overcomes the need for a proxy at all by using manual nameserver lookups that bypass your system's hostsfile for requests. This may also be useful for you if you are having trouble with any proxy.

All you need to do is host this on localhost, add the rule to your hostsfile, enable it in the frontend config.json file, and then... set up SSL for it to work at all. As it turns out, YouTube uses HSTS, so you will probably get an SSL error that your browser doesn't let you bypass instead of the YouTube website.

I still recommend using a proxy, just because it's more user friendly 🥰

Roadmap

At this point in development, most things are unfinished or only partially finished.

  • Homepage (placeholder)
  • Guide menu
  • Signed in support
  • Watch page (partial)
  • Search page
  • Channel page
  • Playlist page
  • Other feed pages
  • Translations
  • Clean-up

Love you! A nice shoutout to the GoodTube community on Discord for getting this party started! Thank you all 🥰

You might also like...
The fastest way to make a powerful JSON:API compatible Rest API with Laravel.
The fastest way to make a powerful JSON:API compatible Rest API with Laravel.

The first fully customizable Laravel JSON:API builder. "CRUD" and protect your resources with 0 (zero) extra line of code. Installation You can instal

Code to accompany the YouTube video "Full PHP cURL API tutorial - how to use a REST API from PHP using cURL"

PHP cURL CRUD Example Example code to accompany this YouTube video. Note that the init_curl.php file contains a placeholder for an API key. DO NOT che

Api.video-wordpress-plugin - The official api.video plugin for WordPress
Api.video-wordpress-plugin - The official api.video plugin for WordPress

api.video WordPress Plugin api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managin

Projet réalisé dans le cadre de l'apprentissage des API et d'API Platform

Bilemo BileMo est une entreprise offrant toute une sélection de téléphones mobiles haut de gamme. Vous êtes en charge du développement de la vitrine d

Bastion API is a simple API made to get query informations

Bastion API is a simple API made to get query informations

A PHP API extension the 'An API of Ice and Fire'

This documentation is meant to enable you to consume our API and get you started right away using your favourite programming language. All endpoints and HTTP methods to be used have been detailed with a sample example for e

Simple Symfony API-Platform Template which you can use to start to develop with symfony and api-platform

symfony-api-platform-skeleton Simple Template for Symfony API You can fork it and change the git remote to your Repo git remote set-url your-git-remo

PDF API. JSON to PDF. PDF Template Management, Visual HTML Template Editor and API to render PDFS by json data
PDF API. JSON to PDF. PDF Template Management, Visual HTML Template Editor and API to render PDFS by json data

PDF Template Management, Visual HTML Template Editor and API to render PDFS by json data PDF ENGINE VERSION: development: This is a prerelease version

Simple library that abstracts different metrics collectors. I find this necessary to have a consistent and simple metrics (functional) API that doesn't cause vendor lock-in.

Metrics Simple library that abstracts different metrics collectors. I find this necessary to have a consistent and simple metrics API that doesn't cau

Owner
Coffee
dommy mommy more like doggy mommy
Coffee
Cbe frontauth - A Textpattern plugin to manage backend connections from frontend and protect content from non-logged users

cbe_frontauth This client-side plugin lets your users (or you) manage backend connection from frontend, i.e. connect and disconnect as they (you) woul

null 4 Jan 31, 2020
Searchable DataObjects is a module that permit to include DataObjects into frontend search

Searchable DataObjects Searchable DataObjects is a module that permit to include DataObjects into frontend search. Introduction Pages are not always t

Gabriele Brosulo 25 May 11, 2022
It allows frontend developer to send ajax requests and return a custom information from the server without a php developer help

[Magento 1 Extension] It allows frontend developer to send ajax requests and return a custom information from the server without a php developer help (without any php code).

Vladimir Fishchenko 62 Apr 1, 2022
YCOM Impersonate. Login as selected YCOM user 🧙‍♂️in frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

Friends Of REDAXO 17 Sep 12, 2022
composer plugin for a better frontend setup

node-composer composer plugin for a better frontend setup PHP projects mostly are Web-Applications. Many Web-Applications also need a frontend part wh

Marius Büscher 5 Jul 26, 2022
A challenge to develop frontend-backend forms and account creating.

Symfony + Vue (Back/Front) Helped and assisted by Vanessa and Paulo. This project have two sides, the back-end(Symfony) and the front-end(Vue.js) for

Rickelme Dias 1 Feb 10, 2022
Zeitgesteuerte Hinweis-Nachrichten im REDAXO-Frontend.

Zeitgesteuerte Benachrichtigungen für REDAXO Mit diesem Addon können Redakteure zeitgesteuerte Hinweis-Nachrichten im Frontend anzeigen, die entweder

alex+ Digitales Marketing 5 Sep 19, 2022
This Magento 2 module adds the option to use Flagpack icons in your Hyvä frontend.

Siteation - Hyva Icon Pack - Flags This Magento 2 module adds the option to use Flagpack icons in your Hyvä frontend. This requires that you have a wo

Siteation 5 Jun 12, 2023
A Laravel Wrapper for the Binance API. Now easily connect and consume the Binance Public & Private API in your Laravel apps without any hassle.

This package provides a Laravel Wrapper for the Binance API and allows you to easily communicate with it. Important Note This package is in early deve

Moinuddin S. Khaja 7 Dec 7, 2022
Google Search Results PHP API via Serp Api

Google Search Results in PHP This Php API is meant to scrape and parse Google, Bing or Baidu results using SerpApi. The full documentation is availabl

SerpApi 42 Nov 14, 2022