diff --git a/douyinliverecorder/spider.py b/douyinliverecorder/spider.py index 4bab645..098a451 100644 --- a/douyinliverecorder/spider.py +++ b/douyinliverecorder/spider.py @@ -4,7 +4,7 @@ Author: Hmily GitHub: https://github.com/ihmily Date: 2023-07-15 23:15:00 -Update: 2025-01-24 12:21:16 +Update: 2025-01-24 15:35:16 Copyright (c) 2023-2024 by Hmily, All Rights Reserved. Function: Get live stream data. """ @@ -61,10 +61,10 @@ async def async_req( proxy_addr = 'http://' + proxy_addr if data or json_data: - async with httpx.AsyncClient(proxies=proxy_addr, timeout=timeout) as client: + async with httpx.AsyncClient(proxy=proxy_addr, timeout=timeout) as client: response = await client.post(url, data=data, json=json_data, headers=headers) else: - async with httpx.AsyncClient(proxies=proxy_addr, timeout=timeout) as client: + async with httpx.AsyncClient(proxy=proxy_addr, timeout=timeout) as client: response = await client.get(url, headers=headers, follow_redirects=True) if redirect_url: @@ -3145,4 +3145,4 @@ async def get_jd_stream_url(url: str, proxy_addr: OptionalStr = None, cookies: O flv_url = json_data['data']['videoUrl'] m3u8_url = json_data['data']['h5VideoUrl'] result |= {"is_live": True, "m3u8_url": m3u8_url, "flv_url": flv_url, "record_url": m3u8_url} - return result \ No newline at end of file + return result diff --git a/pyproject.toml b/pyproject.toml index 46e8b0f..6ecfc2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,26 +1,24 @@ [project] -requires-python = ">=3.10" +name = "douyinliverecorder" +version = "4.0.2" +description = "An easy tool for recording live streams" +authors = [{ name = "Hmily" }] +license = {text = "MIT"} +readme = "README.md" +urls = {Repository = "https://github.com/ihmily/DouyinLiveRecorder"} +keywords = ["douyin", "live", "recorder"] +requires-python = ">=3.10,<4.0" + +dependencies = [ + "requests>=2.31.0", + "loguru>=0.7.3", + "pycryptodome>=3.20.0", + "distro>=1.9.0", + "tqdm>=4.67.1", + "httpx==0.28.1", + "PyExecJS>=1.5.1" +] [build-system] requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" - -[tool.poetry] -name = "douyinliverecorder" -version = "3.0.9" -description = "An easy tool for recording live streams" -authors = ["Hmily"] -license = "MIT" -readme = "README.md" -homepage = "https://github.com/ihmily/DouyinLiveRecorder" -repository = "https://github.com/ihmily/DouyinLiveRecorder" -keywords = ["douyin", "live", "recorder"] - -[tool.poetry.dependencies] -python = "^3.10" -requests = "^2.25.1" -PyExecJS = "^1.5.1" -loguru = "^0.5.3" -pycryptodome = "^3.10.1" -distro = "^1.9.0" -tqdm = "^4.66.5" \ No newline at end of file +build-backend = "poetry.core.masonry.api" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 8726a5c..2cfdfb0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ -requests -PyExecJS -loguru==0.7.2 -pycryptodome==3.20.0 -distro==1.9.0 -tqdm==4.66.5 \ No newline at end of file +requests>=2.31.0 +loguru>=0.7.3 +pycryptodome>=3.20.0 +distro>=1.9.0 +tqdm>=4.67.1 +httpx>=0.28.1 +PyExecJS>=1.5.1 \ No newline at end of file diff --git a/setup.py b/setup.py index 4c8d8e7..6c0a06b 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages setup( name='douyinliverecorder', - version='3.0.9', + version='4.0.2', author='Hmily', description='An easy tool for recording live streams', long_description=open('README.md', encoding='utf-8').read(), @@ -11,12 +11,13 @@ setup( url='https://github.com/ihmily/DouyinLiveRecorder', packages=find_packages(), install_requires=[ - 'requests', - 'PyExecJS', - 'loguru', - 'pycryptodome', - 'distro', - 'tqdm' + 'requests>=2.31.0', + 'loguru>=0.7.3', + 'pycryptodome>=3.20.0', + 'distro>=1.9.0', + 'tqdm>=4.67.1', + 'httpx>=0.28.1' + 'PyExecJS>=1.5.1', ], classifiers=[ 'Development Status :: 3 - Alpha',