Skip to content

Instantly share code, notes, and snippets.

View code-rgb's full-sized avatar
🦇
Begins

Leorio Paradinight code-rgb

🦇
Begins
View GitHub Profile
import logging
import os
import re
from pathlib import Path
from typing import Dict, Optional, Pattern, Tuple, Union
from urllib.parse import quote
import requests
try:
@code-rgb
code-rgb / mediainfo_build.sh
Last active August 27, 2021 07:55
Mediainfo Static
#!/usr/bin/env bash
# Fail fast
set -euo pipefail
WORK_DIR=$PWD
latest_release() {
curl -s "https://api.github.com/repos/$1/releases/latest" |
@code-rgb
code-rgb / streamtape.py
Last active July 4, 2022 15:59
Get direct downoad link from "https://streamtape.com"
__all__ = ["get_st_async", "get_st"]
"""
# Async:
download_link = await get_st_async('https://streamtape.com/v/b89re9b8er94b8/Demo_Video_1.mp4')
# Sync:
download_link = get_st('https://streamtape.com/v/b89re9b8er94b8/Demo_Video_1.mp4')
"""
import asyncio
# Draw Lines
def draw_line(
text: str,
line_char: str = "-",
line_out: str = "#",
line_in: str = "",
max_length: int = 38,
reverse: bool = True,
@code-rgb
code-rgb / aiohttp_helper.py
Created April 13, 2021 07:10
Aiohttp GET request simplified.
"""
Make aiohttp GET request like a champ
"""
# Author: Github.com/code-rgb
import asyncio
import aiohttp
from typing import Optional, Union, Dict
try:
@code-rgb
code-rgb / youtube_formats.md
Created December 27, 2020 10:06 — forked from AgentOak/youtube_formats.md
Youtube Format IDs

Last updated: December 2020

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 WebM WebM WebM MP4 MP4