From b88eac449912e98835aca4561467146d278a11a3 Mon Sep 17 00:00:00 2001 From: Lovi <62809003+Lovi-0@users.noreply.github.com> Date: Sat, 11 Jan 2025 19:00:12 +0100 Subject: [PATCH] Remove setuptools --- README.md | 2 +- StreamingCommunity/Util/headers.py | 8 ++++++-- config.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5abce36..4a30475 100644 --- a/README.md +++ b/README.md @@ -408,7 +408,7 @@ The `run-container` command mounts also the `config.json` file, so any change to | [DDLStreamItaly](https://ddlstreamitaly.co/) | ✅ | | [GuardaSerie](https://guardaserie.academy/) | ✅ | | [MostraGuarda](https://mostraguarda.stream/) | ✅ | -| [StreamingCommunity](https://streamingcommunity.prof/) | ✅ | +| [StreamingCommunity](https://streamingcommunity.ooo/) | ✅ | # Tutorials diff --git a/StreamingCommunity/Util/headers.py b/StreamingCommunity/Util/headers.py index d82a715..6879845 100644 --- a/StreamingCommunity/Util/headers.py +++ b/StreamingCommunity/Util/headers.py @@ -3,7 +3,7 @@ import re import sys import random -import pkg_resources +from importlib.metadata import version, PackageNotFoundError # External library @@ -11,7 +11,11 @@ from fake_useragent import UserAgent # Variable -ua_version = pkg_resources.get_distribution('fake-useragent').version +try: + ua_version = version('fake-useragent') +except PackageNotFoundError: + ua_version = None + if not getattr(sys, 'frozen', False): if ua_version == '1.1.3': ua = UserAgent(use_external_data=True) diff --git a/config.json b/config.json index 682ce37..0fedca5 100644 --- a/config.json +++ b/config.json @@ -59,7 +59,7 @@ }, "SITE": { "streamingcommunity": { - "domain": "prof" + "domain": "ooo" }, "altadefinizione": { "domain": "prof"