From 7bb778a87588bc6a7d1829ebcf80d3c3d61a0257 Mon Sep 17 00:00:00 2001 From: ihmily <114978440+ihmily@users.noreply.github.com> Date: Wed, 5 Feb 2025 11:56:16 +0800 Subject: [PATCH] refactor: rename package from douyinliverecorder to streamget --- demo.py | 8 ++++---- ffmpeg_install.py | 2 +- i18n.py | 2 +- main.py | 8 ++++---- pyproject.toml | 4 ++-- setup.py | 5 +++-- {douyinliverecorder => streamget}/__init__.py | 0 .../http_clients/__init__.py | 0 .../http_clients/async_http.py | 0 .../http_clients/sync_http.py | 0 {douyinliverecorder => streamget}/initializer.py | 0 .../javascript/crypto-js.min.js | 0 {douyinliverecorder => streamget}/javascript/haixiu.js | 0 {douyinliverecorder => streamget}/javascript/liveme.js | 0 .../javascript/taobao-sign.js | 0 {douyinliverecorder => streamget}/javascript/x-bogus.js | 0 {douyinliverecorder => streamget}/logger.py | 2 +- {douyinliverecorder => streamget}/proxy.py | 0 {douyinliverecorder => streamget}/room.py | 0 {douyinliverecorder => streamget}/spider.py | 0 {douyinliverecorder => streamget}/stream.py | 0 {douyinliverecorder => streamget}/utils.py | 0 22 files changed, 16 insertions(+), 15 deletions(-) rename {douyinliverecorder => streamget}/__init__.py (100%) rename {douyinliverecorder => streamget}/http_clients/__init__.py (100%) rename {douyinliverecorder => streamget}/http_clients/async_http.py (100%) rename {douyinliverecorder => streamget}/http_clients/sync_http.py (100%) rename {douyinliverecorder => streamget}/initializer.py (100%) rename {douyinliverecorder => streamget}/javascript/crypto-js.min.js (100%) rename {douyinliverecorder => streamget}/javascript/haixiu.js (100%) rename {douyinliverecorder => streamget}/javascript/liveme.js (100%) rename {douyinliverecorder => streamget}/javascript/taobao-sign.js (100%) rename {douyinliverecorder => streamget}/javascript/x-bogus.js (100%) rename {douyinliverecorder => streamget}/logger.py (94%) rename {douyinliverecorder => streamget}/proxy.py (100%) rename {douyinliverecorder => streamget}/room.py (100%) rename {douyinliverecorder => streamget}/spider.py (100%) rename {douyinliverecorder => streamget}/stream.py (100%) rename {douyinliverecorder => streamget}/utils.py (100%) diff --git a/demo.py b/demo.py index b873e8b6..d3b9f4ca 100644 --- a/demo.py +++ b/demo.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import asyncio -from douyinliverecorder.logger import logger -from douyinliverecorder import spider +from streamget.logger import logger +from streamget import spider # 以下示例直播间链接不保证时效性,请自行查看链接是否能正常访问 -# Please note that the following example live room links may not be up-to-date; +# Please note that the following example live room links may not be up-to-date LIVE_STREAM_CONFIG = { "douyin": { "url": "https://live.douyin.com/745964462470", @@ -208,4 +208,4 @@ def test_live_stream(platform_name: str, proxy_addr=None, cookies=None) -> None: if __name__ == "__main__": platform = "douyin" - test_live_stream(platform) \ No newline at end of file + test_live_stream(platform) diff --git a/ffmpeg_install.py b/ffmpeg_install.py index 1c11fd0d..29a319e7 100644 --- a/ffmpeg_install.py +++ b/ffmpeg_install.py @@ -15,7 +15,7 @@ from pathlib import Path import requests from tqdm import tqdm -from douyinliverecorder.logger import logger +from streamget.logger import logger current_platform = platform.system() execute_dir = os.path.split(os.path.realpath(sys.argv[0]))[0] diff --git a/i18n.py b/i18n.py index 4f487d87..36fb2817 100644 --- a/i18n.py +++ b/i18n.py @@ -20,7 +20,7 @@ def init_gettext(locale_dir, locale_name): locale_path = Path(execute_dir) / 'i18n' _tr = init_gettext(locale_path, 'zh_CN') original_print = builtins.print -package_name = 'douyinliverecorder' +package_name = 'streamget' def translated_print(*args, **kwargs): diff --git a/main.py b/main.py index 135e6413..fa07db32 100644 --- a/main.py +++ b/main.py @@ -27,10 +27,10 @@ from urllib.error import URLError, HTTPError from typing import Any import configparser -from douyinliverecorder import spider, stream -from douyinliverecorder.proxy import ProxyDetector -from douyinliverecorder.utils import logger -from douyinliverecorder import utils +from streamget import spider, stream +from streamget.proxy import ProxyDetector +from streamget.utils import logger +from streamget import utils from msg_push import ( dingtalk, xizhi, tg_bot, send_email, bark, ntfy ) diff --git a/pyproject.toml b/pyproject.toml index 1f36ea00..075e1615 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] -name = "douyinliverecorder" +name = "streamget" version = "4.0.2" -description = "An easy tool for recording live streams" +description = "A simple and efficient tool to fetch live stream URLs from various platforms. Supports multiple platforms and easy integration." authors = [{ name = "Hmily" }] license = {text = "MIT"} readme = "README.md" diff --git a/setup.py b/setup.py index 5a8fce20..8f31458a 100644 --- a/setup.py +++ b/setup.py @@ -2,10 +2,11 @@ from setuptools import setup, find_packages setup( - name='douyinliverecorder', + name='streamget', version='4.0.2', author='Hmily', - description='An easy tool for recording live streams', + description='A simple and efficient tool to fetch live stream URLs from various platforms. Supports multiple ' + 'platforms and easy integration.', long_description=open('README.md', encoding='utf-8').read(), long_description_content_type='text/markdown', url='https://github.com/ihmily/DouyinLiveRecorder', diff --git a/douyinliverecorder/__init__.py b/streamget/__init__.py similarity index 100% rename from douyinliverecorder/__init__.py rename to streamget/__init__.py diff --git a/douyinliverecorder/http_clients/__init__.py b/streamget/http_clients/__init__.py similarity index 100% rename from douyinliverecorder/http_clients/__init__.py rename to streamget/http_clients/__init__.py diff --git a/douyinliverecorder/http_clients/async_http.py b/streamget/http_clients/async_http.py similarity index 100% rename from douyinliverecorder/http_clients/async_http.py rename to streamget/http_clients/async_http.py diff --git a/douyinliverecorder/http_clients/sync_http.py b/streamget/http_clients/sync_http.py similarity index 100% rename from douyinliverecorder/http_clients/sync_http.py rename to streamget/http_clients/sync_http.py diff --git a/douyinliverecorder/initializer.py b/streamget/initializer.py similarity index 100% rename from douyinliverecorder/initializer.py rename to streamget/initializer.py diff --git a/douyinliverecorder/javascript/crypto-js.min.js b/streamget/javascript/crypto-js.min.js similarity index 100% rename from douyinliverecorder/javascript/crypto-js.min.js rename to streamget/javascript/crypto-js.min.js diff --git a/douyinliverecorder/javascript/haixiu.js b/streamget/javascript/haixiu.js similarity index 100% rename from douyinliverecorder/javascript/haixiu.js rename to streamget/javascript/haixiu.js diff --git a/douyinliverecorder/javascript/liveme.js b/streamget/javascript/liveme.js similarity index 100% rename from douyinliverecorder/javascript/liveme.js rename to streamget/javascript/liveme.js diff --git a/douyinliverecorder/javascript/taobao-sign.js b/streamget/javascript/taobao-sign.js similarity index 100% rename from douyinliverecorder/javascript/taobao-sign.js rename to streamget/javascript/taobao-sign.js diff --git a/douyinliverecorder/javascript/x-bogus.js b/streamget/javascript/x-bogus.js similarity index 100% rename from douyinliverecorder/javascript/x-bogus.js rename to streamget/javascript/x-bogus.js diff --git a/douyinliverecorder/logger.py b/streamget/logger.py similarity index 94% rename from douyinliverecorder/logger.py rename to streamget/logger.py index 5b2616ed..8079e504 100644 --- a/douyinliverecorder/logger.py +++ b/streamget/logger.py @@ -10,7 +10,7 @@ script_path = os.path.split(os.path.realpath(sys.argv[0]))[0] logger.add( - f"{script_path}/logs/DouyinLiveRecorder.log", + f"{script_path}/logs/streamget.log", level="DEBUG", format="{time:YYYY-MM-DD HH:mm:ss.SSS} | {level: <8} | {name}:{function}:{line} - {message}", filter=lambda i: i["level"].name != "INFO", diff --git a/douyinliverecorder/proxy.py b/streamget/proxy.py similarity index 100% rename from douyinliverecorder/proxy.py rename to streamget/proxy.py diff --git a/douyinliverecorder/room.py b/streamget/room.py similarity index 100% rename from douyinliverecorder/room.py rename to streamget/room.py diff --git a/douyinliverecorder/spider.py b/streamget/spider.py similarity index 100% rename from douyinliverecorder/spider.py rename to streamget/spider.py diff --git a/douyinliverecorder/stream.py b/streamget/stream.py similarity index 100% rename from douyinliverecorder/stream.py rename to streamget/stream.py diff --git a/douyinliverecorder/utils.py b/streamget/utils.py similarity index 100% rename from douyinliverecorder/utils.py rename to streamget/utils.py