simplesoup 0.1.0__tar.gz
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.
- simplesoup-0.1.0/PKG-INFO +315 -0
- simplesoup-0.1.0/README.md +305 -0
- simplesoup-0.1.0/pyproject.toml +21 -0
- simplesoup-0.1.0/setup.cfg +4 -0
- simplesoup-0.1.0/simplesoup/__init__.py +3 -0
- simplesoup-0.1.0/simplesoup/converter.py +32 -0
- simplesoup-0.1.0/simplesoup/core.py +85 -0
- simplesoup-0.1.0/simplesoup/downloader.py +555 -0
- simplesoup-0.1.0/simplesoup/gallery.py +44 -0
- simplesoup-0.1.0/simplesoup/parser.py +218 -0
- simplesoup-0.1.0/simplesoup.egg-info/PKG-INFO +315 -0
- simplesoup-0.1.0/simplesoup.egg-info/SOURCES.txt +13 -0
- simplesoup-0.1.0/simplesoup.egg-info/dependency_links.txt +1 -0
- simplesoup-0.1.0/simplesoup.egg-info/requires.txt +4 -0
- simplesoup-0.1.0/simplesoup.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: simplesoup
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Simple CSS-style yt-dlp and FFmpeg wrapper
|
|
5
|
+
Requires-Python: >=3.8
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: yt-dlp
|
|
8
|
+
Provides-Extra: gallery
|
|
9
|
+
Requires-Dist: gallery-dl; extra == "gallery"
|
|
10
|
+
|
|
11
|
+
# SimpleSoup
|
|
12
|
+
|
|
13
|
+
A simple Python wrapper for yt-dlp and FFmpeg.
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install simplesoup
|
|
19
|
+
|
|
20
|
+
For gallery support:
|
|
21
|
+
|
|
22
|
+
pip install "simplesoup[gallery]"
|
|
23
|
+
|
|
24
|
+
Import
|
|
25
|
+
|
|
26
|
+
from simplesoup import rz
|
|
27
|
+
|
|
28
|
+
Basic Syntax
|
|
29
|
+
|
|
30
|
+
result = rz({
|
|
31
|
+
"WHAT_TO_REQUEST": "VARIABLE_NAME"
|
|
32
|
+
}, url)
|
|
33
|
+
|
|
34
|
+
WHAT_TO_REQUEST batata hai kya chahiye, aur VARIABLE_NAME batata hai result mein us value ko kis naam se save karna hai.
|
|
35
|
+
|
|
36
|
+
Example:
|
|
37
|
+
|
|
38
|
+
result = rz({
|
|
39
|
+
"title": "title"
|
|
40
|
+
}, url)
|
|
41
|
+
|
|
42
|
+
print(result["title"])
|
|
43
|
+
|
|
44
|
+
Video Download
|
|
45
|
+
|
|
46
|
+
result = rz({
|
|
47
|
+
"video[4]": "video"
|
|
48
|
+
}, url)
|
|
49
|
+
|
|
50
|
+
print(result["video"])
|
|
51
|
+
|
|
52
|
+
video[4] = 720p.
|
|
53
|
+
|
|
54
|
+
Video Quality
|
|
55
|
+
|
|
56
|
+
video[0] → audio
|
|
57
|
+
video[2] → 360p
|
|
58
|
+
video[3] → 480p
|
|
59
|
+
video[4] → 720p
|
|
60
|
+
video[5] → 1080p
|
|
61
|
+
video[6] → best available
|
|
62
|
+
|
|
63
|
+
Example:
|
|
64
|
+
|
|
65
|
+
result = rz({
|
|
66
|
+
"video[5]": "video"
|
|
67
|
+
}, url)
|
|
68
|
+
|
|
69
|
+
Multiple Values At Once
|
|
70
|
+
|
|
71
|
+
Ek hi request mein video aur metadata dono le sakte ho:
|
|
72
|
+
|
|
73
|
+
result = rz({
|
|
74
|
+
"video[4]": "video",
|
|
75
|
+
"title": "title",
|
|
76
|
+
"creator": "creator",
|
|
77
|
+
"url": "video_url",
|
|
78
|
+
"views": "views",
|
|
79
|
+
"likes": "likes",
|
|
80
|
+
"count": "comments",
|
|
81
|
+
"time": "duration",
|
|
82
|
+
"thumbnail": "thumbnail"
|
|
83
|
+
}, url)
|
|
84
|
+
|
|
85
|
+
Values access karne ke liye:
|
|
86
|
+
|
|
87
|
+
print(result["video"])
|
|
88
|
+
print(result["title"])
|
|
89
|
+
print(result["creator"])
|
|
90
|
+
print(result["video_url"])
|
|
91
|
+
print(result["views"])
|
|
92
|
+
print(result["likes"])
|
|
93
|
+
print(result["comments"])
|
|
94
|
+
print(result["duration"])
|
|
95
|
+
print(result["thumbnail"])
|
|
96
|
+
|
|
97
|
+
Order matter nahi karta.
|
|
98
|
+
|
|
99
|
+
Metadata
|
|
100
|
+
|
|
101
|
+
Available metadata:
|
|
102
|
+
|
|
103
|
+
title → video title
|
|
104
|
+
creator → uploader/channel
|
|
105
|
+
url → video URL
|
|
106
|
+
views → view count
|
|
107
|
+
likes → like count
|
|
108
|
+
count → comment count
|
|
109
|
+
time → duration in seconds
|
|
110
|
+
thumbnail → downloaded thumbnail path
|
|
111
|
+
formats → available yt-dlp formats
|
|
112
|
+
|
|
113
|
+
Metadata Only
|
|
114
|
+
|
|
115
|
+
Agar sirf metadata chahiye aur video download nahi karna:
|
|
116
|
+
|
|
117
|
+
result = rz({
|
|
118
|
+
"title": "title",
|
|
119
|
+
"creator": "creator",
|
|
120
|
+
"views": "views",
|
|
121
|
+
"likes": "likes",
|
|
122
|
+
"count": "comments",
|
|
123
|
+
"time": "duration"
|
|
124
|
+
}, url)
|
|
125
|
+
|
|
126
|
+
video[...] block nahi hone par video download nahi hota.
|
|
127
|
+
|
|
128
|
+
Thumbnail
|
|
129
|
+
|
|
130
|
+
result = rz({
|
|
131
|
+
"thumbnail": "thumbnail"
|
|
132
|
+
}, url)
|
|
133
|
+
|
|
134
|
+
print(result["thumbnail"])
|
|
135
|
+
|
|
136
|
+
Thumbnail actual .jpg file ke roop mein download hota hai.
|
|
137
|
+
|
|
138
|
+
Playlist
|
|
139
|
+
|
|
140
|
+
Playlist syntax:
|
|
141
|
+
|
|
142
|
+
result = rz({
|
|
143
|
+
"playlist": "QUALITY:SKIP:COUNT"
|
|
144
|
+
}, playlist_url)
|
|
145
|
+
|
|
146
|
+
Example:
|
|
147
|
+
|
|
148
|
+
result = rz({
|
|
149
|
+
"playlist": "4:20:3"
|
|
150
|
+
}, playlist_url)
|
|
151
|
+
|
|
152
|
+
Meaning:
|
|
153
|
+
|
|
154
|
+
4 → 720p
|
|
155
|
+
20 → first 20 videos skip
|
|
156
|
+
3 → next 3 videos download
|
|
157
|
+
|
|
158
|
+
So:
|
|
159
|
+
|
|
160
|
+
Video 1-20 → skip
|
|
161
|
+
Video 21 → download
|
|
162
|
+
Video 22 → download
|
|
163
|
+
Video 23 → download
|
|
164
|
+
|
|
165
|
+
Downloaded videos:
|
|
166
|
+
|
|
167
|
+
for video in result["videos"]:
|
|
168
|
+
print(video)
|
|
169
|
+
|
|
170
|
+
Playlist + Metadata
|
|
171
|
+
|
|
172
|
+
result = rz({
|
|
173
|
+
"playlist": "4:20:3",
|
|
174
|
+
"title": "playlist_title"
|
|
175
|
+
}, playlist_url)
|
|
176
|
+
|
|
177
|
+
print(result["playlist_title"])
|
|
178
|
+
print(result["videos"])
|
|
179
|
+
|
|
180
|
+
Gallery
|
|
181
|
+
|
|
182
|
+
Gallery downloading ke liye:
|
|
183
|
+
|
|
184
|
+
result = rz({
|
|
185
|
+
"gallery": "images"
|
|
186
|
+
}, gallery_url)
|
|
187
|
+
|
|
188
|
+
print(result)
|
|
189
|
+
|
|
190
|
+
Gallery support ke liye gallery-dl install hona chahiye:
|
|
191
|
+
|
|
192
|
+
pip install "simplesoup[gallery]"
|
|
193
|
+
|
|
194
|
+
Cookies
|
|
195
|
+
|
|
196
|
+
Cookies simplesoup/core.py mein configure kiye jaate hain:
|
|
197
|
+
|
|
198
|
+
COOKIES = "/storage/emulated/0/Download/cookies.txt"
|
|
199
|
+
|
|
200
|
+
Example:
|
|
201
|
+
|
|
202
|
+
COOKIES = "/storage/emulated/0/Download/reddit_cookies.txt"
|
|
203
|
+
|
|
204
|
+
Cookies disable karne ke liye:
|
|
205
|
+
|
|
206
|
+
COOKIES = None
|
|
207
|
+
|
|
208
|
+
SimpleSoup configured cookie file ko use karta hai.
|
|
209
|
+
|
|
210
|
+
Progress Callback
|
|
211
|
+
|
|
212
|
+
Optional progress callback:
|
|
213
|
+
|
|
214
|
+
def progress(percent, speed, mode):
|
|
215
|
+
print(
|
|
216
|
+
f"[Download {percent}] "
|
|
217
|
+
f"[Network {speed}] "
|
|
218
|
+
f"[Mode {mode}]"
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
result = rz(
|
|
222
|
+
{
|
|
223
|
+
"video[4]": "video"
|
|
224
|
+
},
|
|
225
|
+
url,
|
|
226
|
+
progress_callback=progress
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
Callback ko ye 3 values milti hain:
|
|
230
|
+
|
|
231
|
+
percent → download percentage
|
|
232
|
+
speed → network speed
|
|
233
|
+
mode → Video / Playlist
|
|
234
|
+
|
|
235
|
+
Complete Example
|
|
236
|
+
|
|
237
|
+
from simplesoup import rz
|
|
238
|
+
|
|
239
|
+
url = "VIDEO_URL"
|
|
240
|
+
|
|
241
|
+
result = rz({
|
|
242
|
+
"video[4]": "video",
|
|
243
|
+
"title": "title",
|
|
244
|
+
"creator": "creator",
|
|
245
|
+
"url": "video_url",
|
|
246
|
+
"views": "views",
|
|
247
|
+
"likes": "likes",
|
|
248
|
+
"count": "comments",
|
|
249
|
+
"time": "duration",
|
|
250
|
+
"thumbnail": "thumbnail"
|
|
251
|
+
}, url)
|
|
252
|
+
|
|
253
|
+
print("Video:", result["video"])
|
|
254
|
+
print("Title:", result["title"])
|
|
255
|
+
print("Creator:", result["creator"])
|
|
256
|
+
print("URL:", result["video_url"])
|
|
257
|
+
print("Views:", result["views"])
|
|
258
|
+
print("Likes:", result["likes"])
|
|
259
|
+
print("Comments:", result["comments"])
|
|
260
|
+
print("Duration:", result["duration"])
|
|
261
|
+
print("Thumbnail:", result["thumbnail"])
|
|
262
|
+
|
|
263
|
+
Default Download Location
|
|
264
|
+
|
|
265
|
+
/storage/emulated/0/Download/ReiDownloader/
|
|
266
|
+
|
|
267
|
+
API Syntax Summary
|
|
268
|
+
|
|
269
|
+
Single video:
|
|
270
|
+
|
|
271
|
+
rz({
|
|
272
|
+
"video[QUALITY]": "variable"
|
|
273
|
+
}, url)
|
|
274
|
+
|
|
275
|
+
Metadata:
|
|
276
|
+
|
|
277
|
+
rz({
|
|
278
|
+
"title": "variable",
|
|
279
|
+
"creator": "variable",
|
|
280
|
+
"url": "variable",
|
|
281
|
+
"views": "variable",
|
|
282
|
+
"likes": "variable",
|
|
283
|
+
"count": "variable",
|
|
284
|
+
"time": "variable",
|
|
285
|
+
"thumbnail": "variable"
|
|
286
|
+
}, url)
|
|
287
|
+
|
|
288
|
+
Video + metadata:
|
|
289
|
+
|
|
290
|
+
rz({
|
|
291
|
+
"video[4]": "video",
|
|
292
|
+
"title": "title",
|
|
293
|
+
"creator": "creator",
|
|
294
|
+
"views": "views",
|
|
295
|
+
"likes": "likes",
|
|
296
|
+
"count": "comments",
|
|
297
|
+
"time": "duration",
|
|
298
|
+
"thumbnail": "thumbnail"
|
|
299
|
+
}, url)
|
|
300
|
+
|
|
301
|
+
Playlist:
|
|
302
|
+
|
|
303
|
+
rz({
|
|
304
|
+
"playlist": "QUALITY:SKIP:COUNT"
|
|
305
|
+
}, playlist_url)
|
|
306
|
+
|
|
307
|
+
Gallery:
|
|
308
|
+
|
|
309
|
+
rz({
|
|
310
|
+
"gallery": "variable"
|
|
311
|
+
}, gallery_url)
|
|
312
|
+
|
|
313
|
+
Version
|
|
314
|
+
|
|
315
|
+
SimpleSoup 0.1.0
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
# SimpleSoup
|
|
2
|
+
|
|
3
|
+
A simple Python wrapper for yt-dlp and FFmpeg.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install simplesoup
|
|
9
|
+
|
|
10
|
+
For gallery support:
|
|
11
|
+
|
|
12
|
+
pip install "simplesoup[gallery]"
|
|
13
|
+
|
|
14
|
+
Import
|
|
15
|
+
|
|
16
|
+
from simplesoup import rz
|
|
17
|
+
|
|
18
|
+
Basic Syntax
|
|
19
|
+
|
|
20
|
+
result = rz({
|
|
21
|
+
"WHAT_TO_REQUEST": "VARIABLE_NAME"
|
|
22
|
+
}, url)
|
|
23
|
+
|
|
24
|
+
WHAT_TO_REQUEST batata hai kya chahiye, aur VARIABLE_NAME batata hai result mein us value ko kis naam se save karna hai.
|
|
25
|
+
|
|
26
|
+
Example:
|
|
27
|
+
|
|
28
|
+
result = rz({
|
|
29
|
+
"title": "title"
|
|
30
|
+
}, url)
|
|
31
|
+
|
|
32
|
+
print(result["title"])
|
|
33
|
+
|
|
34
|
+
Video Download
|
|
35
|
+
|
|
36
|
+
result = rz({
|
|
37
|
+
"video[4]": "video"
|
|
38
|
+
}, url)
|
|
39
|
+
|
|
40
|
+
print(result["video"])
|
|
41
|
+
|
|
42
|
+
video[4] = 720p.
|
|
43
|
+
|
|
44
|
+
Video Quality
|
|
45
|
+
|
|
46
|
+
video[0] → audio
|
|
47
|
+
video[2] → 360p
|
|
48
|
+
video[3] → 480p
|
|
49
|
+
video[4] → 720p
|
|
50
|
+
video[5] → 1080p
|
|
51
|
+
video[6] → best available
|
|
52
|
+
|
|
53
|
+
Example:
|
|
54
|
+
|
|
55
|
+
result = rz({
|
|
56
|
+
"video[5]": "video"
|
|
57
|
+
}, url)
|
|
58
|
+
|
|
59
|
+
Multiple Values At Once
|
|
60
|
+
|
|
61
|
+
Ek hi request mein video aur metadata dono le sakte ho:
|
|
62
|
+
|
|
63
|
+
result = rz({
|
|
64
|
+
"video[4]": "video",
|
|
65
|
+
"title": "title",
|
|
66
|
+
"creator": "creator",
|
|
67
|
+
"url": "video_url",
|
|
68
|
+
"views": "views",
|
|
69
|
+
"likes": "likes",
|
|
70
|
+
"count": "comments",
|
|
71
|
+
"time": "duration",
|
|
72
|
+
"thumbnail": "thumbnail"
|
|
73
|
+
}, url)
|
|
74
|
+
|
|
75
|
+
Values access karne ke liye:
|
|
76
|
+
|
|
77
|
+
print(result["video"])
|
|
78
|
+
print(result["title"])
|
|
79
|
+
print(result["creator"])
|
|
80
|
+
print(result["video_url"])
|
|
81
|
+
print(result["views"])
|
|
82
|
+
print(result["likes"])
|
|
83
|
+
print(result["comments"])
|
|
84
|
+
print(result["duration"])
|
|
85
|
+
print(result["thumbnail"])
|
|
86
|
+
|
|
87
|
+
Order matter nahi karta.
|
|
88
|
+
|
|
89
|
+
Metadata
|
|
90
|
+
|
|
91
|
+
Available metadata:
|
|
92
|
+
|
|
93
|
+
title → video title
|
|
94
|
+
creator → uploader/channel
|
|
95
|
+
url → video URL
|
|
96
|
+
views → view count
|
|
97
|
+
likes → like count
|
|
98
|
+
count → comment count
|
|
99
|
+
time → duration in seconds
|
|
100
|
+
thumbnail → downloaded thumbnail path
|
|
101
|
+
formats → available yt-dlp formats
|
|
102
|
+
|
|
103
|
+
Metadata Only
|
|
104
|
+
|
|
105
|
+
Agar sirf metadata chahiye aur video download nahi karna:
|
|
106
|
+
|
|
107
|
+
result = rz({
|
|
108
|
+
"title": "title",
|
|
109
|
+
"creator": "creator",
|
|
110
|
+
"views": "views",
|
|
111
|
+
"likes": "likes",
|
|
112
|
+
"count": "comments",
|
|
113
|
+
"time": "duration"
|
|
114
|
+
}, url)
|
|
115
|
+
|
|
116
|
+
video[...] block nahi hone par video download nahi hota.
|
|
117
|
+
|
|
118
|
+
Thumbnail
|
|
119
|
+
|
|
120
|
+
result = rz({
|
|
121
|
+
"thumbnail": "thumbnail"
|
|
122
|
+
}, url)
|
|
123
|
+
|
|
124
|
+
print(result["thumbnail"])
|
|
125
|
+
|
|
126
|
+
Thumbnail actual .jpg file ke roop mein download hota hai.
|
|
127
|
+
|
|
128
|
+
Playlist
|
|
129
|
+
|
|
130
|
+
Playlist syntax:
|
|
131
|
+
|
|
132
|
+
result = rz({
|
|
133
|
+
"playlist": "QUALITY:SKIP:COUNT"
|
|
134
|
+
}, playlist_url)
|
|
135
|
+
|
|
136
|
+
Example:
|
|
137
|
+
|
|
138
|
+
result = rz({
|
|
139
|
+
"playlist": "4:20:3"
|
|
140
|
+
}, playlist_url)
|
|
141
|
+
|
|
142
|
+
Meaning:
|
|
143
|
+
|
|
144
|
+
4 → 720p
|
|
145
|
+
20 → first 20 videos skip
|
|
146
|
+
3 → next 3 videos download
|
|
147
|
+
|
|
148
|
+
So:
|
|
149
|
+
|
|
150
|
+
Video 1-20 → skip
|
|
151
|
+
Video 21 → download
|
|
152
|
+
Video 22 → download
|
|
153
|
+
Video 23 → download
|
|
154
|
+
|
|
155
|
+
Downloaded videos:
|
|
156
|
+
|
|
157
|
+
for video in result["videos"]:
|
|
158
|
+
print(video)
|
|
159
|
+
|
|
160
|
+
Playlist + Metadata
|
|
161
|
+
|
|
162
|
+
result = rz({
|
|
163
|
+
"playlist": "4:20:3",
|
|
164
|
+
"title": "playlist_title"
|
|
165
|
+
}, playlist_url)
|
|
166
|
+
|
|
167
|
+
print(result["playlist_title"])
|
|
168
|
+
print(result["videos"])
|
|
169
|
+
|
|
170
|
+
Gallery
|
|
171
|
+
|
|
172
|
+
Gallery downloading ke liye:
|
|
173
|
+
|
|
174
|
+
result = rz({
|
|
175
|
+
"gallery": "images"
|
|
176
|
+
}, gallery_url)
|
|
177
|
+
|
|
178
|
+
print(result)
|
|
179
|
+
|
|
180
|
+
Gallery support ke liye gallery-dl install hona chahiye:
|
|
181
|
+
|
|
182
|
+
pip install "simplesoup[gallery]"
|
|
183
|
+
|
|
184
|
+
Cookies
|
|
185
|
+
|
|
186
|
+
Cookies simplesoup/core.py mein configure kiye jaate hain:
|
|
187
|
+
|
|
188
|
+
COOKIES = "/storage/emulated/0/Download/cookies.txt"
|
|
189
|
+
|
|
190
|
+
Example:
|
|
191
|
+
|
|
192
|
+
COOKIES = "/storage/emulated/0/Download/reddit_cookies.txt"
|
|
193
|
+
|
|
194
|
+
Cookies disable karne ke liye:
|
|
195
|
+
|
|
196
|
+
COOKIES = None
|
|
197
|
+
|
|
198
|
+
SimpleSoup configured cookie file ko use karta hai.
|
|
199
|
+
|
|
200
|
+
Progress Callback
|
|
201
|
+
|
|
202
|
+
Optional progress callback:
|
|
203
|
+
|
|
204
|
+
def progress(percent, speed, mode):
|
|
205
|
+
print(
|
|
206
|
+
f"[Download {percent}] "
|
|
207
|
+
f"[Network {speed}] "
|
|
208
|
+
f"[Mode {mode}]"
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
result = rz(
|
|
212
|
+
{
|
|
213
|
+
"video[4]": "video"
|
|
214
|
+
},
|
|
215
|
+
url,
|
|
216
|
+
progress_callback=progress
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
Callback ko ye 3 values milti hain:
|
|
220
|
+
|
|
221
|
+
percent → download percentage
|
|
222
|
+
speed → network speed
|
|
223
|
+
mode → Video / Playlist
|
|
224
|
+
|
|
225
|
+
Complete Example
|
|
226
|
+
|
|
227
|
+
from simplesoup import rz
|
|
228
|
+
|
|
229
|
+
url = "VIDEO_URL"
|
|
230
|
+
|
|
231
|
+
result = rz({
|
|
232
|
+
"video[4]": "video",
|
|
233
|
+
"title": "title",
|
|
234
|
+
"creator": "creator",
|
|
235
|
+
"url": "video_url",
|
|
236
|
+
"views": "views",
|
|
237
|
+
"likes": "likes",
|
|
238
|
+
"count": "comments",
|
|
239
|
+
"time": "duration",
|
|
240
|
+
"thumbnail": "thumbnail"
|
|
241
|
+
}, url)
|
|
242
|
+
|
|
243
|
+
print("Video:", result["video"])
|
|
244
|
+
print("Title:", result["title"])
|
|
245
|
+
print("Creator:", result["creator"])
|
|
246
|
+
print("URL:", result["video_url"])
|
|
247
|
+
print("Views:", result["views"])
|
|
248
|
+
print("Likes:", result["likes"])
|
|
249
|
+
print("Comments:", result["comments"])
|
|
250
|
+
print("Duration:", result["duration"])
|
|
251
|
+
print("Thumbnail:", result["thumbnail"])
|
|
252
|
+
|
|
253
|
+
Default Download Location
|
|
254
|
+
|
|
255
|
+
/storage/emulated/0/Download/ReiDownloader/
|
|
256
|
+
|
|
257
|
+
API Syntax Summary
|
|
258
|
+
|
|
259
|
+
Single video:
|
|
260
|
+
|
|
261
|
+
rz({
|
|
262
|
+
"video[QUALITY]": "variable"
|
|
263
|
+
}, url)
|
|
264
|
+
|
|
265
|
+
Metadata:
|
|
266
|
+
|
|
267
|
+
rz({
|
|
268
|
+
"title": "variable",
|
|
269
|
+
"creator": "variable",
|
|
270
|
+
"url": "variable",
|
|
271
|
+
"views": "variable",
|
|
272
|
+
"likes": "variable",
|
|
273
|
+
"count": "variable",
|
|
274
|
+
"time": "variable",
|
|
275
|
+
"thumbnail": "variable"
|
|
276
|
+
}, url)
|
|
277
|
+
|
|
278
|
+
Video + metadata:
|
|
279
|
+
|
|
280
|
+
rz({
|
|
281
|
+
"video[4]": "video",
|
|
282
|
+
"title": "title",
|
|
283
|
+
"creator": "creator",
|
|
284
|
+
"views": "views",
|
|
285
|
+
"likes": "likes",
|
|
286
|
+
"count": "comments",
|
|
287
|
+
"time": "duration",
|
|
288
|
+
"thumbnail": "thumbnail"
|
|
289
|
+
}, url)
|
|
290
|
+
|
|
291
|
+
Playlist:
|
|
292
|
+
|
|
293
|
+
rz({
|
|
294
|
+
"playlist": "QUALITY:SKIP:COUNT"
|
|
295
|
+
}, playlist_url)
|
|
296
|
+
|
|
297
|
+
Gallery:
|
|
298
|
+
|
|
299
|
+
rz({
|
|
300
|
+
"gallery": "variable"
|
|
301
|
+
}, gallery_url)
|
|
302
|
+
|
|
303
|
+
Version
|
|
304
|
+
|
|
305
|
+
SimpleSoup 0.1.0
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "simplesoup"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Simple CSS-style yt-dlp and FFmpeg wrapper"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"yt-dlp"
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
[project.optional-dependencies]
|
|
16
|
+
gallery = [
|
|
17
|
+
"gallery-dl"
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[tool.setuptools.packages.find]
|
|
21
|
+
include = ["simplesoup*"]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Converter:
|
|
5
|
+
|
|
6
|
+
@staticmethod
|
|
7
|
+
def convert(input_file, output_file):
|
|
8
|
+
|
|
9
|
+
command = [
|
|
10
|
+
"ffmpeg",
|
|
11
|
+
"-y",
|
|
12
|
+
"-i",
|
|
13
|
+
input_file,
|
|
14
|
+
"-vf",
|
|
15
|
+
"format=nv12",
|
|
16
|
+
"-c:v",
|
|
17
|
+
"h264_mediacodec",
|
|
18
|
+
"-g",
|
|
19
|
+
"120",
|
|
20
|
+
"-c:a",
|
|
21
|
+
"aac",
|
|
22
|
+
"-movflags",
|
|
23
|
+
"+faststart",
|
|
24
|
+
output_file
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
subprocess.run(
|
|
28
|
+
command,
|
|
29
|
+
check=True
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
return output_file
|