This project has been archived by its maintainers, and is no longer receiving any updates.
y2m: YouTube Live to m3u
- Enables to get m3u from YouTube live link(s) easily
- A Python Library
y2m - Two CLI
y2mconvandy2mlink
- A Python Library
- Forked from benmoose39/YouTube_to_m3u
Install
From source
git clone --depth 1 https://githu.com/eggplants/y2m y2m
cd y2m
pip install .
From PyPI
pip install y2m
Usage
CLI
$ y2mconv ytlive_channel.txt -o ytlive.m3u
wrote: ytlive.m3u
$ y2mlink "https://www.youtube.com/c/mangalamtv/live"
https://manifest.googlevideo.com/api/manifest/hls_variant/.../file/index.m3u
$ y2mconv -h
usage: y2mconv [-h] [-o OUT] [-f] [-V] info
Convert YouTube Live info file into m3u
positional arguments:
info input YouTube Live info file path
optional arguments:
-h, --help show this help message and exit
-o OUT, --out OUT output m3u path (overwrite: `-f`)
-f, --force overwrite if output path is exist
-V, --version show program's version number and exit
example input file: https://git.io/JMQ7B
$ y2mlink -h
usage: y2mlink [-h] [-V] url
Convert YouTube Live link into m3u one
positional arguments:
url input YouTube url
optional arguments:
-h, --help show this help message and exit
-V, --version show program's version number and exit
valid url pattern:
/^https://www.youtube.com/(?:user|channel)/[a-zA-Z0-9_-]+/live/?$/
/^https://www.youtube.com/watch?v=[a-zA-Z0-9_-]+/
/^https://www.youtube.com/c/[a-zA-Z0-9_-]+/live/?$/
Library
from y2m import y2m
# `<channel name> | <group name> | <logo> | <tvg-id>`
# -> `#EXTINF:-1 group-title="<group name>" tvg-logo="<logo>" tvg-id="<tvg-id>", <channel name>`
y2m.meta_fields_to_extinf(fields: str) -> str: ...
# `https://www.youtube.com/(?:user|channel)/[a-zA-Z0-9_-]+/live`
# -> `https://manifest.googlevideo.com/.../index.m3u`
y2m.convert_ytlive_to_m3u(url: str) -> str: ...
# url -> bool
y2m.is_valid_url(url: str) -> bool: ...
# `ytlive_channel.txt` -> `ytlive.m3u`
y2m.parse_info(info_file_path: str) -> list[str]: ...
Input file format
...
~~ comment
...
<channel name> | <group name> | <logo> | <tvg-id>
https://www.youtube.com/(?:user|channel)/[a-zA-Z0-9_-]+/live
...
Metadata
Release files for y2m 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| y2m-0.4.tar.gz | 5.2 kB | Without provenance | Details for y2m-0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| y2m-0.4-py3-none-any.whl | Python 3 | none | any | Details for y2m-0.4-py3-none-any.whl |
Total release size: 11.6 kB
Release files / y2m-0.4.tar.gz
| Download URL | y2m-0.4.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
02fd85acc2b4bf5bad7df3c875d52063d6a9ad25d17e925ec0bcd6ec58c0248d
|
|
BLAKE2b-256 checksum How to use checksums |
101d468411af031f9f71c413eefe610e99888ae5ad81ccdb2dc12b0323bf13f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / y2m-0.4-py3-none-any.whl
| Download URL | y2m-0.4-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f87f93d0f35aade569c88900ddf818ea10d00f3883cb1fe9cf53434c78b12a0
|
|
BLAKE2b-256 checksum How to use checksums |
ff41c16c8eb0bbe6c72e21bdce75870a79708fee1d42f2717c5f57540b90412a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Security for y2m 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.