yt-dlp-host-api 0.0.8__py3-none-any.whl → 0.0.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- yt_dlp_host_api/client.py +20 -0
- {yt_dlp_host_api-0.0.8.dist-info → yt_dlp_host_api-0.0.9.dist-info}/METADATA +8 -4
- yt_dlp_host_api-0.0.9.dist-info/RECORD +10 -0
- {yt_dlp_host_api-0.0.8.dist-info → yt_dlp_host_api-0.0.9.dist-info}/WHEEL +1 -1
- yt_dlp_host_api-0.0.8.dist-info/RECORD +0 -10
- {yt_dlp_host_api-0.0.8.dist-info → yt_dlp_host_api-0.0.9.dist-info}/LICENSE +0 -0
- {yt_dlp_host_api-0.0.8.dist-info → yt_dlp_host_api-0.0.9.dist-info}/top_level.txt +0 -0
yt_dlp_host_api/client.py
CHANGED
@@ -15,6 +15,12 @@ class Client:
|
|
15
15
|
def get_audio(self, url):
|
16
16
|
return self.send_task.get_audio(url=url).get_result()
|
17
17
|
|
18
|
+
def get_live_video(self, url, duration, start=0, quality="best"):
|
19
|
+
return self.send_task.get_live_video(url=url, start=start, duration=duration, quality=quality).get_result()
|
20
|
+
|
21
|
+
def get_live_audio(self, url, duration, start=0):
|
22
|
+
return self.send_task.get_live_audio(url=url, start=start, duration=duration).get_result()
|
23
|
+
|
18
24
|
def get_info(self, url):
|
19
25
|
return self.send_task.get_info(url=url).get_result()
|
20
26
|
|
@@ -69,6 +75,20 @@ class Client:
|
|
69
75
|
if response.status_code != 200:
|
70
76
|
raise APIError(response.json().get('error', 'Unknown error'))
|
71
77
|
return Task(self.client, response.json()['task_id'], 'get_audio')
|
78
|
+
|
79
|
+
def get_live_video(self, url, duration, start=0, quality="best"):
|
80
|
+
data = {"url": url, "start": start, "duration": duration, "quality": quality}
|
81
|
+
response = requests.post(f"{self.client.host_url}/get_live_video", json=data, headers=self.client.headers)
|
82
|
+
if response.status_code != 200:
|
83
|
+
raise APIError(response.json().get('error', 'Unknown error'))
|
84
|
+
return Task(self.client, response.json()['task_id'], 'get_video')
|
85
|
+
|
86
|
+
def get_live_audio(self, url, duration, start=0):
|
87
|
+
data = {"url": url, "start": start, "duration": duration}
|
88
|
+
response = requests.post(f"{self.client.host_url}/get_live_audio", json=data, headers=self.client.headers)
|
89
|
+
if response.status_code != 200:
|
90
|
+
raise APIError(response.json().get('error', 'Unknown error'))
|
91
|
+
return Task(self.client, response.json()['task_id'], 'get_audio')
|
72
92
|
|
73
93
|
def get_info(self, url):
|
74
94
|
data = {"url": url}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: yt_dlp_host_api
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.9
|
4
4
|
Summary: A Python library for interacting with the yt-dlp-host API
|
5
5
|
Author-email: "Amadeus (Wasys)" <tubik.corp@gmail.com>
|
6
6
|
Project-URL: Homepage, https://github.com/Vasysik/yt-dlp-host-api
|
@@ -13,9 +13,9 @@ Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
14
14
|
Requires-Dist: requests >=2.25.1
|
15
15
|
|
16
|
-
# yt-dlp-host API Client
|
16
|
+
# [yt-dlp-host](https://github.com/Vasysik/yt-dlp-host) API Client
|
17
17
|
|
18
|
-
This is a Python library for interacting with the yt-dlp-host API.
|
18
|
+
This is a Python library for interacting with the [yt-dlp-host](https://github.com/Vasysik/yt-dlp-host) API.
|
19
19
|
|
20
20
|
## Installation
|
21
21
|
|
@@ -72,9 +72,13 @@ client.delete_key("user_key")
|
|
72
72
|
|
73
73
|
- `client.get_video(url, quality='best')`: Simple way to get the result of get_video
|
74
74
|
- `client.get_audio(url)`: Simple way to get the result of get_audio
|
75
|
+
- `client.get_live_video(url, duration, start=0, quality='best')`: Simple way to get the result of get_live_video
|
76
|
+
- `client.get_live_audio(url, duration, start=0)`: Simple way to get the result of get_live_audio
|
75
77
|
- `client.get_info(url)`: Simple way to get the result of get_info
|
76
78
|
- `client.send_task.get_video(url, quality='best')`: Initiates a get_video task
|
77
|
-
- `client.send_task.get_audio(url
|
79
|
+
- `client.send_task.get_audio(url)`: Initiates a get_audio task
|
80
|
+
- `client.send_task.get_live_video(url, duration, start=0, quality='best')`: Initiates a get_video task
|
81
|
+
- `client.send_task.get_live_audio(url, duration, start=0)`: Initiates a get_audio task
|
78
82
|
- `client.send_task.get_info(url)`: Initiates a get_info task
|
79
83
|
- `client.check_permissions(permissions)`: Checks for all permissions in the list
|
80
84
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
yt_dlp_host_api/__init__.py,sha256=RHx1BvH2Cy_dweEKo5sA-hdBOfBdY_2ds7srPuKGzWQ,41
|
2
|
+
yt_dlp_host_api/api.py,sha256=iLzWKoyiXeu0Y1Uky8PzpxxHTSMcTGzxlCRT121AKcM,196
|
3
|
+
yt_dlp_host_api/client.py,sha256=gKZbbrrgTcjj-aXMvwmB3o9f5idMCBMokAfv80_qe54,4898
|
4
|
+
yt_dlp_host_api/exceptions.py,sha256=U_70W1R_ZcUfKptUShGB5VPWQXwc5M29_sNC8pwwq8g,38
|
5
|
+
yt_dlp_host_api/task.py,sha256=llgBAO_L1CajklMsbICdRpLdOV05Wi0oUh9NKj0bD0w,2674
|
6
|
+
yt_dlp_host_api-0.0.9.dist-info/LICENSE,sha256=-_Ad_xue4UymJ8jO-ZsSg0vmZ6SUm8WYdoEwHLyBUlc,1078
|
7
|
+
yt_dlp_host_api-0.0.9.dist-info/METADATA,sha256=u27b9ebTsU1hXYWeNgOeZqKDU7U3TX0qMwpBPL5Ucpc,3972
|
8
|
+
yt_dlp_host_api-0.0.9.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
9
|
+
yt_dlp_host_api-0.0.9.dist-info/top_level.txt,sha256=Mn3FZuqLCHr47sRjhtEOz7lDl4lpsHkymWANORYp72s,16
|
10
|
+
yt_dlp_host_api-0.0.9.dist-info/RECORD,,
|
@@ -1,10 +0,0 @@
|
|
1
|
-
yt_dlp_host_api/__init__.py,sha256=RHx1BvH2Cy_dweEKo5sA-hdBOfBdY_2ds7srPuKGzWQ,41
|
2
|
-
yt_dlp_host_api/api.py,sha256=iLzWKoyiXeu0Y1Uky8PzpxxHTSMcTGzxlCRT121AKcM,196
|
3
|
-
yt_dlp_host_api/client.py,sha256=TDyzpKwhTqwi_Ob3oV3KCweZG-GDolPo6FFcdR_h0UE,3581
|
4
|
-
yt_dlp_host_api/exceptions.py,sha256=U_70W1R_ZcUfKptUShGB5VPWQXwc5M29_sNC8pwwq8g,38
|
5
|
-
yt_dlp_host_api/task.py,sha256=llgBAO_L1CajklMsbICdRpLdOV05Wi0oUh9NKj0bD0w,2674
|
6
|
-
yt_dlp_host_api-0.0.8.dist-info/LICENSE,sha256=-_Ad_xue4UymJ8jO-ZsSg0vmZ6SUm8WYdoEwHLyBUlc,1078
|
7
|
-
yt_dlp_host_api-0.0.8.dist-info/METADATA,sha256=I3nTkfbB2BVY9nStph5DrHVDQoLQ9JQdLItbYLCqnFA,3496
|
8
|
-
yt_dlp_host_api-0.0.8.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
|
9
|
-
yt_dlp_host_api-0.0.8.dist-info/top_level.txt,sha256=Mn3FZuqLCHr47sRjhtEOz7lDl4lpsHkymWANORYp72s,16
|
10
|
-
yt_dlp_host_api-0.0.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|