A Python Client to View F1TV Content the right way

Overview

F1Hub

A Python Client to View F1TV Content the right way

F1Hub is a terminal application running directly on your computer -- no connection to the website needed* *In theory. As of now, the F1TV website is needed for some content

alt text

Features

What this is
  • No lenthy website load times
  • Even if the website is down, usually the API stays available, which means F1Hub will be working as well.
  • Designed to work with the 2021 updated F1TV API, delivering you 1080p50 streams by default
  • Multi-Stream functionality: Unlike on the website, this tool opens as many streams as you like, enabling you to create your own Race Control at home
  • Simply enter a Content ID (long number in the URL of a play page) in the content ID menu and immediately play! No long menu browsing required.

Anti-Features

What this is not

F1Hub is NOT a piracy tool. To use it, you will need to log in with your valid F1TV Credentials. To use livestream functionality, you will need to have an F1TV Pro account. As of now (1 Week ahead of 2021 Preseason testing), there is NO livestream functionality, as there is no way to test it properly. I will be working on it during preseason and aim at having it implemented by start of the season.

Installation

Cool, how do I get it?

Dependencies

First, let's install the dependencies. Make sure you have pip installed:

pip -v

If the command gives you an output, you're good to go. If it says that the command 'pip' was not found, follow the this guide to install pip on your machine: Now, use pip to install Simple Term Menu

python3 -m pip install simple-term-menu

Next, install the video player MPV, according to this guide. To be sure, reboot your computer and type

mpv --version

into your Terminal to make sure it works and is in the PATH Done! Now let's get the main program:

Main Program

Download F1Hub, either by cloning the repository, or by downloading it directly. To clone it:

git clone https://github.com/kodosexe/f1hub

Now, you can simply run it by executing

python3 main.py

and you will be greeted by the Menu

Usage

Login by password is now available! It is stored in plaintext on your computer for now, though, so be careful! Otherwise: You will need to open F1TV in your browser, right-click anywhere on the page, and select "Inspect" from the menu. In the bar that opens, select the "Network" tab. Check the box saying "Preserve Log". In Firefox, this option will appear when you click on the gears and is named "Persist Logs" Now, log in, as with any other website. The tab should fill with a list of network requests. Once you are logged in, type "ENTITLEMENT" into the search bar of the inspector tab. There should be one entry of that name. Right click on the entry and select "Copy -> Copy Response". The information was copied to your clipboard In the folder containing F1Hub, open or create the file named "entitlement.json" and paste your clipboard.

After restarting F1Hub, you can use it fully. You may need to repeat that step occasionally. Usually, when F1Hub crashes and gives you an error, it will be due to entitlement issues.

How to work with the ContentID

To play a stream using content ID, first navigate to the video in your browser. You will see a long sequence of numbers in the URL, something like "1000000716". That is the content ID. Copy that number and paste it into F1Hub in the "Play by Content ID" menu. Proceed like normal. This may work for live sessions, if they are designed the same way. We will know when Preseason testing comes around.

Known Bugs

  • 2020 Preaseason Testing doesn't include full sessions. This is because this is the only event that has a different API response structure. I plan on fixing this soon.
  • The menu sometimes spazzes out in seasons before 2018. This is because of long titles resulting by a mishandling of the API - this is low priority because these sessions have only one stream. The main purpose of this program is to provide a multi-stream service. However, I do plan on fixing it at some point down the line.
  • Some menus only show partial content, none at all, or provide no stream. The API pre-2017 is wildly different. I didn't realize until too late and it will be patched at some point. 2020-2018 Work flawlessly, though
  • 2021 Sessions and Info not available. Current season is not implemented yet, as there is no info on the buildup. It will come at some point before the season.
  • There is NO error handling... if something goes wrong, it will crash. Please keep in mind, this program, including all API analysis was built in little over 24Hrs. It will have bugs and issues.

Planned Features

  • All the bug fixes!
  • Better, more flexible menu structure, and a graphical UI down the line.
  • Live feature before the season's start
  • 2021 Integration before the season's start
  • Any Event based on ID being able to be played, ideally before the season's start. NOW AVAILABLE

Disclaimer

This program is provided as is, with no warranty whatsoever. I do not take responsibility for any damages or issues that may result from direct or indirect use of this program. Just to cover my back.

You might also like...
Savecontentbot - Telegram Save Content Bot With Same more Features

Save Restricted Content Bot A simple telegram bot to save restricted content wit

Python JIRA Library is the easiest way to automate JIRA. Support for py27 was dropped on 2019-10-14, do not raise bugs related to it.
Python JIRA Library is the easiest way to automate JIRA. Support for py27 was dropped on 2019-10-14, do not raise bugs related to it.

Jira Python Library This library eases the use of the Jira REST API from Python and it has been used in production for years. As this is an open-sourc

Python linting made easy. Also a casual yet honorific way to address individuals who have entered an organization prior to you.
Python linting made easy. Also a casual yet honorific way to address individuals who have entered an organization prior to you.

pysen What is pysen? pysen aims to provide a unified platform to configure and run day-to-day development tools. We envision the following scenarios i

A python script to acquire multiple aws ec2 instances in a forensically sound-ish way
A python script to acquire multiple aws ec2 instances in a forensically sound-ish way

acquire_ec2.py The script acquire_ec2.py is used to automatically acquire AWS EC2 instances. The script needs to be run on an EC2 instance in the same

The simple way of using Imgur.

PyImgur The simple way of using Imgur. You can upload images, download images, read comments, update your albums, message people and more. In fact, yo

Easy way to use Telegram bot to hide your identity.

telegram-support-bot Easy way to use Telegram bot to hide your identity. Useful for support, anonymous channel management. Free clone of Livegram Bot.

A really easy way to display your spotify listening status on spotify.

Spotify playing README A really easy way to display your spotify listening status on READMEs and Websites too! Demo Here's the embed from the site. Cu

A way to export your saved reddit posts to a Notion table.
A way to export your saved reddit posts to a Notion table.

reddit-saved-to-notion A way to export your saved reddit posts and comments to a Notion table.Uses notion-sdk-py and praw for interacting with Notion

A simple Telegram bot which handles images in whole different way
A simple Telegram bot which handles images in whole different way

zeroimagebot thezeroimagebot 🌟 I Can Edit Dimension Of An image which is required by @stickers 🌟 I Can Extract Text From An Image 🌟 !!! New Updates

Releases(beta-v1.0)
Owner
kodos
kodos
A simple Discord bot written in Python

Acolyte A small and simple little Discord bot written in Python that utilizes the discord.py library. Dependencies The bot depends on Python 3.9 and u

0 Jul 17, 2021
An open source API to validate the EU Covid Certificates / Green Certificates

Open Covid Certificate Validator This an open source API to validate EU Digital COVID Certificates. It receives a COVID certificate and validates it u

Merlin Schumacher 47 May 30, 2022
Shred your reddit comment and post history

trasheddit Shred your reddit comment and post history (x89/Shreddit replacement) Usage Simple Example Download trasheddit: git clone https://github.co

Elly 2 Jan 05, 2022
News API consisting various sources from Tanzania

Tanzania News API News API consisting various sources from Tanzania. Fork the project Clone the project git clone https://github.com/username/news-a

Innocent Zenda 6 Oct 06, 2022
Unauthenticated enumeration of services, roles, and users in an AWS account or in every AWS account in existence.

Quiet Riot 🎶 C'mon, Feel The Noise 🎶 An enumeration tool for scalable, unauthenticated validation of AWS principals; including AWS Acccount IDs, roo

Wes Ladd 89 Jan 05, 2023
A community Billy vs SNAKEMAN bot

BvS Bot A discord bot built for the Billy vs SNAKEMAN community! Dependencies An installation of Python 3.9.x with ssl compiled. The following pip pac

Neopolitan 2 May 10, 2022
Centralized whale instance using github actions, sourcing metadata from bigquery-public-data.

Whale Demo Instance: Bigquery Public Data This is a fully-functioning demo instance of the whale data catalog, actively scraping data from Bigquery's

Hyperquery 17 Dec 14, 2022
Build a better understanding of your data in PostgreSQL.

Data Fluent for PostgreSQL Build a better understanding of your data in PostgreSQL. The following shows an example report generated by this tool. It g

Mark Litwintschik 28 Aug 30, 2022
The Main Pythonic Version Of Twig Using Nextcord

The Main Pythonic Version Of Twig Using Nextcord

8 Mar 21, 2022
This is the repository for HalpyBOT, the Hull Seals IRC Chatbot Assistant.

HalpyBOT 1.4.2 This is the repository for HalpyBOT, the Hull Seals IRC Chatbot Assistant. Description This repository houses all of the files required

The Hull Seals 3 Nov 03, 2022
Davide Gallitelli 3 Dec 21, 2021
Accurately dump Commodore 64 tapes

TrueTape64 A cheap, easy to build adapter to interface a Commodore 1530 (C2N) Datasette to your PC to dump and preserve your aging Commodore 64 softwa

francesco 38 Dec 03, 2022
Wrapper for Gismeteo.ru.

pygismeteo Обёртка для Gismeteo.ru. Асинхронная версия здесь. Установка python -m pip install -U pygismeteo Документация https://pygismeteo.readthedoc

Almaz 7 Dec 26, 2022
The EscapePod Python SDK for Cyb3rVector's EscapePod Extension Proxy

EscapePod Extension SDK for Python by cyb3rdog This is the EscapePod Python SDK for Cyb3rVector's EscapePod Extension Proxy. With this SDK, you can: m

cyb3rdog 3 Mar 07, 2022
Python SDK for IEX Cloud

iexfinance Python SDK for IEX Cloud. Architecture mirrors that of the IEX Cloud API (and its documentation). An easy-to-use toolkit to obtain data for

Addison Lynch 640 Jan 07, 2023
"zpool iostats" for humans; find the slow parts of your ZFS pool

Getting the gist of zfs statistics vpool-demo.mp4 The ZFS command "zpool iostat" provides a histogram listing of how often it takes to do things in pa

Chad 57 Oct 24, 2022
Acid's Utilities is a bot for my Discord server that alerts when I go live, welcomes new users, has some awesome games and so much more!

Acid's Utilities Acid's Utilities is a bot for my Discord server that alerts when I go live, welcomes new users, has some awesome games and so much mo

AcidFilms (Fin Stuart) 3 Nov 19, 2021
A collection of discord tools I've made.

Discord A collection of discord tools i've made. What's in here? Basically every discord related project i've worked on can be found here, i'll try an

?? ?? ?? 6 Nov 13, 2021
A bot that downloads all the necessary files from WeLearn and lists your assignments, filter due assignments, etc.

Welearn-bot This is a bot which lets you interact with WeLearn from the command line. It can Download all files/resources from your courses and organi

Parth Bibekar 17 Oct 19, 2022
FTX auto lending bot with python

FTX auto lending bot Get the API key Check my article for step by step + screenshots Setup & Run Install python 3 Install dependency pip install -r re

Patompong Manprasatkul 1 Dec 24, 2021