ytstudio-cli 0.1.0__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.
- ytstudio/__init__.py +0 -0
- ytstudio/api.py +174 -0
- ytstudio/commands/__init__.py +0 -0
- ytstudio/commands/analytics.py +570 -0
- ytstudio/commands/comments.py +176 -0
- ytstudio/commands/videos.py +475 -0
- ytstudio/config.py +74 -0
- ytstudio/demo.py +189 -0
- ytstudio/demo_data/analytics_metrics.json +103 -0
- ytstudio/demo_data/channel.json +21 -0
- ytstudio/demo_data/comments.json +284 -0
- ytstudio/demo_data/playlist_items.json +26 -0
- ytstudio/demo_data/videos.json +451 -0
- ytstudio/main.py +80 -0
- ytstudio/registry.py +440 -0
- ytstudio/services.py +14 -0
- ytstudio/ui.py +106 -0
- ytstudio/version.py +78 -0
- ytstudio_cli-0.1.0.dist-info/METADATA +80 -0
- ytstudio_cli-0.1.0.dist-info/RECORD +23 -0
- ytstudio_cli-0.1.0.dist-info/WHEEL +4 -0
- ytstudio_cli-0.1.0.dist-info/entry_points.txt +2 -0
- ytstudio_cli-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"items": [
|
|
3
|
+
{"snippet": {"title": "TypeScript in 100 Seconds", "publishedAt": "2020-11-25T00:00:00Z"}, "contentDetails": {"videoId": "zQnBQ4tB3ZA"}},
|
|
4
|
+
{"snippet": {"title": "Flutter in 100 Seconds", "publishedAt": "2020-04-14T00:00:00Z"}, "contentDetails": {"videoId": "lHhRhPV--G0"}},
|
|
5
|
+
{"snippet": {"title": "Recursion in 100 Seconds", "publishedAt": "2019-12-30T00:00:00Z"}, "contentDetails": {"videoId": "rf60MejMz3E"}},
|
|
6
|
+
{"snippet": {"title": "React in 100 Seconds", "publishedAt": "2021-05-12T00:00:00Z"}, "contentDetails": {"videoId": "Ata9cSC2WpM"}},
|
|
7
|
+
{"snippet": {"title": "God-Tier Developer Roadmap", "publishedAt": "2022-08-15T00:00:00Z"}, "contentDetails": {"videoId": "w7ejDZ8SWv8"}},
|
|
8
|
+
{"snippet": {"title": "Python in 100 Seconds", "publishedAt": "2021-03-08T00:00:00Z"}, "contentDetails": {"videoId": "dQw4w9WgXcQ"}},
|
|
9
|
+
{"snippet": {"title": "Rust in 100 Seconds", "publishedAt": "2021-07-22T00:00:00Z"}, "contentDetails": {"videoId": "7C2z4GqqS5E"}},
|
|
10
|
+
{"snippet": {"title": "I built the same app 10 times", "publishedAt": "2023-01-18T00:00:00Z"}, "contentDetails": {"videoId": "8C3z4GqqS5F"}},
|
|
11
|
+
{"snippet": {"title": "Docker in 100 Seconds", "publishedAt": "2020-08-03T00:00:00Z"}, "contentDetails": {"videoId": "9D4z5HrrT6G"}},
|
|
12
|
+
{"snippet": {"title": "Kubernetes in 100 Seconds", "publishedAt": "2021-02-15T00:00:00Z"}, "contentDetails": {"videoId": "0E5z6IssU7H"}},
|
|
13
|
+
{"snippet": {"title": "GraphQL in 100 Seconds", "publishedAt": "2020-06-20T00:00:00Z"}, "contentDetails": {"videoId": "1F6z7JttV8I"}},
|
|
14
|
+
{"snippet": {"title": "10 CSS tricks you didn't know", "publishedAt": "2022-11-05T00:00:00Z"}, "contentDetails": {"videoId": "2G7z8KuuW9J"}},
|
|
15
|
+
{"snippet": {"title": "SQL Explained in 100 Seconds", "publishedAt": "2021-09-12T00:00:00Z"}, "contentDetails": {"videoId": "3H8z9LvvX0K"}},
|
|
16
|
+
{"snippet": {"title": "Linux in 100 Seconds", "publishedAt": "2020-10-28T00:00:00Z"}, "contentDetails": {"videoId": "4I9z0MwwY1L"}},
|
|
17
|
+
{"snippet": {"title": "AI is getting satisfying", "publishedAt": "2024-02-01T00:00:00Z"}, "contentDetails": {"videoId": "5J0z1NxxZ2M"}},
|
|
18
|
+
{"snippet": {"title": "Next.js in 100 Seconds", "publishedAt": "2021-11-03T00:00:00Z"}, "contentDetails": {"videoId": "6K1z2OyyA3N"}},
|
|
19
|
+
{"snippet": {"title": "Git in 100 Seconds", "publishedAt": "2020-05-18T00:00:00Z"}, "contentDetails": {"videoId": "7L2z3PzzB4O"}},
|
|
20
|
+
{"snippet": {"title": "MongoDB in 100 Seconds", "publishedAt": "2021-04-07T00:00:00Z"}, "contentDetails": {"videoId": "8M3z4QaaC5P"}},
|
|
21
|
+
{"snippet": {"title": "AWS in 100 Seconds", "publishedAt": "2022-03-14T00:00:00Z"}, "contentDetails": {"videoId": "9N4z5RbbD6Q"}},
|
|
22
|
+
{"snippet": {"title": "Svelte in 100 Seconds", "publishedAt": "2021-06-25T00:00:00Z"}, "contentDetails": {"videoId": "0O5z6SccE7R"}}
|
|
23
|
+
],
|
|
24
|
+
"pageInfo": {"totalResults": 20},
|
|
25
|
+
"nextPageToken": null
|
|
26
|
+
}
|
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
{
|
|
2
|
+
"items": [
|
|
3
|
+
{
|
|
4
|
+
"id": "zQnBQ4tB3ZA",
|
|
5
|
+
"snippet": {
|
|
6
|
+
"title": "TypeScript in 100 Seconds",
|
|
7
|
+
"description": "Learn the basics of TypeScript in 100 seconds...",
|
|
8
|
+
"publishedAt": "2020-11-25T00:00:00Z",
|
|
9
|
+
"tags": ["typescript", "javascript", "100SecondsOfCode", "programming"],
|
|
10
|
+
"categoryId": "28",
|
|
11
|
+
"defaultLanguage": "en",
|
|
12
|
+
"defaultAudioLanguage": "en"
|
|
13
|
+
},
|
|
14
|
+
"statistics": {
|
|
15
|
+
"viewCount": "3200000",
|
|
16
|
+
"likeCount": "98000",
|
|
17
|
+
"commentCount": "2400"
|
|
18
|
+
},
|
|
19
|
+
"contentDetails": {
|
|
20
|
+
"duration": "PT2M1S"
|
|
21
|
+
},
|
|
22
|
+
"status": {
|
|
23
|
+
"privacyStatus": "public"
|
|
24
|
+
},
|
|
25
|
+
"localizations": {
|
|
26
|
+
"en": {
|
|
27
|
+
"title": "TypeScript in 100 Seconds",
|
|
28
|
+
"description": "Learn the basics of TypeScript in 100 seconds..."
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "lHhRhPV--G0",
|
|
34
|
+
"snippet": {
|
|
35
|
+
"title": "Flutter in 100 Seconds",
|
|
36
|
+
"description": "Build apps on iOS, Android, the web, and desktop with Flutter...",
|
|
37
|
+
"publishedAt": "2020-04-14T00:00:00Z",
|
|
38
|
+
"tags": ["flutter", "dart", "mobile", "100SecondsOfCode"],
|
|
39
|
+
"categoryId": "28"
|
|
40
|
+
},
|
|
41
|
+
"statistics": {
|
|
42
|
+
"viewCount": "2100000",
|
|
43
|
+
"likeCount": "72000",
|
|
44
|
+
"commentCount": "1800"
|
|
45
|
+
},
|
|
46
|
+
"contentDetails": {
|
|
47
|
+
"duration": "PT2M8S"
|
|
48
|
+
},
|
|
49
|
+
"status": {
|
|
50
|
+
"privacyStatus": "public"
|
|
51
|
+
},
|
|
52
|
+
"localizations": {}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "rf60MejMz3E",
|
|
56
|
+
"snippet": {
|
|
57
|
+
"title": "Recursion in 100 Seconds",
|
|
58
|
+
"description": "Learn how recursion works in 100 seconds...",
|
|
59
|
+
"publishedAt": "2019-12-30T00:00:00Z",
|
|
60
|
+
"tags": ["recursion", "algorithms", "100SecondsOfCode", "compsci"],
|
|
61
|
+
"categoryId": "28"
|
|
62
|
+
},
|
|
63
|
+
"statistics": {
|
|
64
|
+
"viewCount": "1800000",
|
|
65
|
+
"likeCount": "65000",
|
|
66
|
+
"commentCount": "1500"
|
|
67
|
+
},
|
|
68
|
+
"contentDetails": {
|
|
69
|
+
"duration": "PT1M48S"
|
|
70
|
+
},
|
|
71
|
+
"status": {
|
|
72
|
+
"privacyStatus": "public"
|
|
73
|
+
},
|
|
74
|
+
"localizations": {}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"id": "Ata9cSC2WpM",
|
|
78
|
+
"snippet": {
|
|
79
|
+
"title": "React in 100 Seconds",
|
|
80
|
+
"description": "Learn the basics of React in 100 seconds...",
|
|
81
|
+
"publishedAt": "2021-05-12T00:00:00Z",
|
|
82
|
+
"tags": ["react", "javascript", "frontend", "100SecondsOfCode"],
|
|
83
|
+
"categoryId": "28"
|
|
84
|
+
},
|
|
85
|
+
"statistics": {
|
|
86
|
+
"viewCount": "4500000",
|
|
87
|
+
"likeCount": "125000",
|
|
88
|
+
"commentCount": "3200"
|
|
89
|
+
},
|
|
90
|
+
"contentDetails": {
|
|
91
|
+
"duration": "PT2M15S"
|
|
92
|
+
},
|
|
93
|
+
"status": {
|
|
94
|
+
"privacyStatus": "public"
|
|
95
|
+
},
|
|
96
|
+
"localizations": {}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "w7ejDZ8SWv8",
|
|
100
|
+
"snippet": {
|
|
101
|
+
"title": "God-Tier Developer Roadmap",
|
|
102
|
+
"description": "The mass extinction satisfies both business and our lizard brain...",
|
|
103
|
+
"publishedAt": "2022-08-15T00:00:00Z",
|
|
104
|
+
"tags": ["roadmap", "developer", "career", "programming"],
|
|
105
|
+
"categoryId": "28"
|
|
106
|
+
},
|
|
107
|
+
"statistics": {
|
|
108
|
+
"viewCount": "6800000",
|
|
109
|
+
"likeCount": "215000",
|
|
110
|
+
"commentCount": "8500"
|
|
111
|
+
},
|
|
112
|
+
"contentDetails": {
|
|
113
|
+
"duration": "PT11M42S"
|
|
114
|
+
},
|
|
115
|
+
"status": {
|
|
116
|
+
"privacyStatus": "public"
|
|
117
|
+
},
|
|
118
|
+
"localizations": {}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "dQw4w9WgXcQ",
|
|
122
|
+
"snippet": {
|
|
123
|
+
"title": "Python in 100 Seconds",
|
|
124
|
+
"description": "Learn Python in 100 seconds...",
|
|
125
|
+
"publishedAt": "2021-03-08T00:00:00Z",
|
|
126
|
+
"tags": ["python", "programming", "100SecondsOfCode", "backend"],
|
|
127
|
+
"categoryId": "28"
|
|
128
|
+
},
|
|
129
|
+
"statistics": {
|
|
130
|
+
"viewCount": "5200000",
|
|
131
|
+
"likeCount": "142000",
|
|
132
|
+
"commentCount": "4100"
|
|
133
|
+
},
|
|
134
|
+
"contentDetails": {
|
|
135
|
+
"duration": "PT2M12S"
|
|
136
|
+
},
|
|
137
|
+
"status": {
|
|
138
|
+
"privacyStatus": "public"
|
|
139
|
+
},
|
|
140
|
+
"localizations": {}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"id": "7C2z4GqqS5E",
|
|
144
|
+
"snippet": {
|
|
145
|
+
"title": "Rust in 100 Seconds",
|
|
146
|
+
"description": "Rust is a blazingly fast systems programming language...",
|
|
147
|
+
"publishedAt": "2021-07-22T00:00:00Z",
|
|
148
|
+
"tags": ["rust", "systems", "100SecondsOfCode", "programming"],
|
|
149
|
+
"categoryId": "28"
|
|
150
|
+
},
|
|
151
|
+
"statistics": {
|
|
152
|
+
"viewCount": "2800000",
|
|
153
|
+
"likeCount": "89000",
|
|
154
|
+
"commentCount": "2200"
|
|
155
|
+
},
|
|
156
|
+
"contentDetails": {
|
|
157
|
+
"duration": "PT2M24S"
|
|
158
|
+
},
|
|
159
|
+
"status": {
|
|
160
|
+
"privacyStatus": "public"
|
|
161
|
+
},
|
|
162
|
+
"localizations": {}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"id": "8C3z4GqqS5F",
|
|
166
|
+
"snippet": {
|
|
167
|
+
"title": "I built the same app 10 times",
|
|
168
|
+
"description": "Which JavaScript framework is best?...",
|
|
169
|
+
"publishedAt": "2023-01-18T00:00:00Z",
|
|
170
|
+
"tags": ["frameworks", "comparison", "webdev", "javascript"],
|
|
171
|
+
"categoryId": "28"
|
|
172
|
+
},
|
|
173
|
+
"statistics": {
|
|
174
|
+
"viewCount": "3900000",
|
|
175
|
+
"likeCount": "156000",
|
|
176
|
+
"commentCount": "5600"
|
|
177
|
+
},
|
|
178
|
+
"contentDetails": {
|
|
179
|
+
"duration": "PT14M33S"
|
|
180
|
+
},
|
|
181
|
+
"status": {
|
|
182
|
+
"privacyStatus": "public"
|
|
183
|
+
},
|
|
184
|
+
"localizations": {}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"id": "9D4z5HrrT6G",
|
|
188
|
+
"snippet": {
|
|
189
|
+
"title": "Docker in 100 Seconds",
|
|
190
|
+
"description": "Containerize your applications with Docker...",
|
|
191
|
+
"publishedAt": "2020-08-03T00:00:00Z",
|
|
192
|
+
"tags": ["docker", "devops", "100SecondsOfCode", "containers"],
|
|
193
|
+
"categoryId": "28"
|
|
194
|
+
},
|
|
195
|
+
"statistics": {
|
|
196
|
+
"viewCount": "2400000",
|
|
197
|
+
"likeCount": "78000",
|
|
198
|
+
"commentCount": "1900"
|
|
199
|
+
},
|
|
200
|
+
"contentDetails": {
|
|
201
|
+
"duration": "PT2M6S"
|
|
202
|
+
},
|
|
203
|
+
"status": {
|
|
204
|
+
"privacyStatus": "public"
|
|
205
|
+
},
|
|
206
|
+
"localizations": {}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"id": "0E5z6IssU7H",
|
|
210
|
+
"snippet": {
|
|
211
|
+
"title": "Kubernetes in 100 Seconds",
|
|
212
|
+
"description": "Orchestrate containers at scale with K8s...",
|
|
213
|
+
"publishedAt": "2021-02-15T00:00:00Z",
|
|
214
|
+
"tags": ["kubernetes", "k8s", "devops", "100SecondsOfCode"],
|
|
215
|
+
"categoryId": "28"
|
|
216
|
+
},
|
|
217
|
+
"statistics": {
|
|
218
|
+
"viewCount": "1900000",
|
|
219
|
+
"likeCount": "62000",
|
|
220
|
+
"commentCount": "1400"
|
|
221
|
+
},
|
|
222
|
+
"contentDetails": {
|
|
223
|
+
"duration": "PT2M18S"
|
|
224
|
+
},
|
|
225
|
+
"status": {
|
|
226
|
+
"privacyStatus": "public"
|
|
227
|
+
},
|
|
228
|
+
"localizations": {}
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"id": "1F6z7JttV8I",
|
|
232
|
+
"snippet": {
|
|
233
|
+
"title": "GraphQL in 100 Seconds",
|
|
234
|
+
"description": "A query language for your API...",
|
|
235
|
+
"publishedAt": "2020-06-20T00:00:00Z",
|
|
236
|
+
"tags": ["graphql", "api", "100SecondsOfCode", "backend"],
|
|
237
|
+
"categoryId": "28"
|
|
238
|
+
},
|
|
239
|
+
"statistics": {
|
|
240
|
+
"viewCount": "1600000",
|
|
241
|
+
"likeCount": "54000",
|
|
242
|
+
"commentCount": "1200"
|
|
243
|
+
},
|
|
244
|
+
"contentDetails": {
|
|
245
|
+
"duration": "PT2M4S"
|
|
246
|
+
},
|
|
247
|
+
"status": {
|
|
248
|
+
"privacyStatus": "public"
|
|
249
|
+
},
|
|
250
|
+
"localizations": {}
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"id": "2G7z8KuuW9J",
|
|
254
|
+
"snippet": {
|
|
255
|
+
"title": "10 CSS tricks you didn't know",
|
|
256
|
+
"description": "Level up your CSS game with these tips...",
|
|
257
|
+
"publishedAt": "2022-11-05T00:00:00Z",
|
|
258
|
+
"tags": ["css", "frontend", "webdev", "tricks"],
|
|
259
|
+
"categoryId": "28"
|
|
260
|
+
},
|
|
261
|
+
"statistics": {
|
|
262
|
+
"viewCount": "1100000",
|
|
263
|
+
"likeCount": "45000",
|
|
264
|
+
"commentCount": "890"
|
|
265
|
+
},
|
|
266
|
+
"contentDetails": {
|
|
267
|
+
"duration": "PT8M22S"
|
|
268
|
+
},
|
|
269
|
+
"status": {
|
|
270
|
+
"privacyStatus": "public"
|
|
271
|
+
},
|
|
272
|
+
"localizations": {}
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"id": "3H8z9LvvX0K",
|
|
276
|
+
"snippet": {
|
|
277
|
+
"title": "SQL Explained in 100 Seconds",
|
|
278
|
+
"description": "The most important language for data...",
|
|
279
|
+
"publishedAt": "2021-09-12T00:00:00Z",
|
|
280
|
+
"tags": ["sql", "database", "100SecondsOfCode", "backend"],
|
|
281
|
+
"categoryId": "28"
|
|
282
|
+
},
|
|
283
|
+
"statistics": {
|
|
284
|
+
"viewCount": "2100000",
|
|
285
|
+
"likeCount": "71000",
|
|
286
|
+
"commentCount": "1600"
|
|
287
|
+
},
|
|
288
|
+
"contentDetails": {
|
|
289
|
+
"duration": "PT2M9S"
|
|
290
|
+
},
|
|
291
|
+
"status": {
|
|
292
|
+
"privacyStatus": "public"
|
|
293
|
+
},
|
|
294
|
+
"localizations": {}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"id": "4I9z0MwwY1L",
|
|
298
|
+
"snippet": {
|
|
299
|
+
"title": "Linux in 100 Seconds",
|
|
300
|
+
"description": "The operating system that runs the world...",
|
|
301
|
+
"publishedAt": "2020-10-28T00:00:00Z",
|
|
302
|
+
"tags": ["linux", "os", "100SecondsOfCode", "devops"],
|
|
303
|
+
"categoryId": "28"
|
|
304
|
+
},
|
|
305
|
+
"statistics": {
|
|
306
|
+
"viewCount": "2600000",
|
|
307
|
+
"likeCount": "82000",
|
|
308
|
+
"commentCount": "2100"
|
|
309
|
+
},
|
|
310
|
+
"contentDetails": {
|
|
311
|
+
"duration": "PT2M15S"
|
|
312
|
+
},
|
|
313
|
+
"status": {
|
|
314
|
+
"privacyStatus": "public"
|
|
315
|
+
},
|
|
316
|
+
"localizations": {}
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"id": "5J0z1NxxZ2M",
|
|
320
|
+
"snippet": {
|
|
321
|
+
"title": "AI is getting satisfying",
|
|
322
|
+
"description": "This week in AI and code...",
|
|
323
|
+
"publishedAt": "2024-02-01T00:00:00Z",
|
|
324
|
+
"tags": ["ai", "code", "news", "tech"],
|
|
325
|
+
"categoryId": "28"
|
|
326
|
+
},
|
|
327
|
+
"statistics": {
|
|
328
|
+
"viewCount": "890000",
|
|
329
|
+
"likeCount": "38000",
|
|
330
|
+
"commentCount": "1200"
|
|
331
|
+
},
|
|
332
|
+
"contentDetails": {
|
|
333
|
+
"duration": "PT5M44S"
|
|
334
|
+
},
|
|
335
|
+
"status": {
|
|
336
|
+
"privacyStatus": "public"
|
|
337
|
+
},
|
|
338
|
+
"localizations": {}
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"id": "6K1z2OyyA3N",
|
|
342
|
+
"snippet": {
|
|
343
|
+
"title": "Next.js in 100 Seconds",
|
|
344
|
+
"description": "The React framework for production...",
|
|
345
|
+
"publishedAt": "2021-11-03T00:00:00Z",
|
|
346
|
+
"tags": ["nextjs", "react", "100SecondsOfCode", "fullstack"],
|
|
347
|
+
"categoryId": "28"
|
|
348
|
+
},
|
|
349
|
+
"statistics": {
|
|
350
|
+
"viewCount": "1800000",
|
|
351
|
+
"likeCount": "58000",
|
|
352
|
+
"commentCount": "1300"
|
|
353
|
+
},
|
|
354
|
+
"contentDetails": {
|
|
355
|
+
"duration": "PT2M11S"
|
|
356
|
+
},
|
|
357
|
+
"status": {
|
|
358
|
+
"privacyStatus": "public"
|
|
359
|
+
},
|
|
360
|
+
"localizations": {}
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"id": "7L2z3PzzB4O",
|
|
364
|
+
"snippet": {
|
|
365
|
+
"title": "Git in 100 Seconds",
|
|
366
|
+
"description": "Version control for the modern developer...",
|
|
367
|
+
"publishedAt": "2020-05-18T00:00:00Z",
|
|
368
|
+
"tags": ["git", "vcs", "100SecondsOfCode", "devtools"],
|
|
369
|
+
"categoryId": "28"
|
|
370
|
+
},
|
|
371
|
+
"statistics": {
|
|
372
|
+
"viewCount": "3100000",
|
|
373
|
+
"likeCount": "95000",
|
|
374
|
+
"commentCount": "2300"
|
|
375
|
+
},
|
|
376
|
+
"contentDetails": {
|
|
377
|
+
"duration": "PT2M3S"
|
|
378
|
+
},
|
|
379
|
+
"status": {
|
|
380
|
+
"privacyStatus": "public"
|
|
381
|
+
},
|
|
382
|
+
"localizations": {}
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"id": "8M3z4QaaC5P",
|
|
386
|
+
"snippet": {
|
|
387
|
+
"title": "MongoDB in 100 Seconds",
|
|
388
|
+
"description": "A document database built for modern apps...",
|
|
389
|
+
"publishedAt": "2021-04-07T00:00:00Z",
|
|
390
|
+
"tags": ["mongodb", "nosql", "100SecondsOfCode", "database"],
|
|
391
|
+
"categoryId": "28"
|
|
392
|
+
},
|
|
393
|
+
"statistics": {
|
|
394
|
+
"viewCount": "1500000",
|
|
395
|
+
"likeCount": "49000",
|
|
396
|
+
"commentCount": "1100"
|
|
397
|
+
},
|
|
398
|
+
"contentDetails": {
|
|
399
|
+
"duration": "PT2M7S"
|
|
400
|
+
},
|
|
401
|
+
"status": {
|
|
402
|
+
"privacyStatus": "public"
|
|
403
|
+
},
|
|
404
|
+
"localizations": {}
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"id": "9N4z5RbbD6Q",
|
|
408
|
+
"snippet": {
|
|
409
|
+
"title": "AWS in 100 Seconds",
|
|
410
|
+
"description": "The cloud platform that powers the internet...",
|
|
411
|
+
"publishedAt": "2022-03-14T00:00:00Z",
|
|
412
|
+
"tags": ["aws", "cloud", "100SecondsOfCode", "devops"],
|
|
413
|
+
"categoryId": "28"
|
|
414
|
+
},
|
|
415
|
+
"statistics": {
|
|
416
|
+
"viewCount": "1400000",
|
|
417
|
+
"likeCount": "46000",
|
|
418
|
+
"commentCount": "980"
|
|
419
|
+
},
|
|
420
|
+
"contentDetails": {
|
|
421
|
+
"duration": "PT2M19S"
|
|
422
|
+
},
|
|
423
|
+
"status": {
|
|
424
|
+
"privacyStatus": "public"
|
|
425
|
+
},
|
|
426
|
+
"localizations": {}
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"id": "0O5z6SccE7R",
|
|
430
|
+
"snippet": {
|
|
431
|
+
"title": "Svelte in 100 Seconds",
|
|
432
|
+
"description": "A radical new approach to building UIs...",
|
|
433
|
+
"publishedAt": "2021-06-25T00:00:00Z",
|
|
434
|
+
"tags": ["svelte", "frontend", "100SecondsOfCode", "javascript"],
|
|
435
|
+
"categoryId": "28"
|
|
436
|
+
},
|
|
437
|
+
"statistics": {
|
|
438
|
+
"viewCount": "1700000",
|
|
439
|
+
"likeCount": "56000",
|
|
440
|
+
"commentCount": "1250"
|
|
441
|
+
},
|
|
442
|
+
"contentDetails": {
|
|
443
|
+
"duration": "PT2M5S"
|
|
444
|
+
},
|
|
445
|
+
"status": {
|
|
446
|
+
"privacyStatus": "public"
|
|
447
|
+
},
|
|
448
|
+
"localizations": {}
|
|
449
|
+
}
|
|
450
|
+
]
|
|
451
|
+
}
|
ytstudio/main.py
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import atexit
|
|
2
|
+
|
|
3
|
+
import typer
|
|
4
|
+
from rich.console import Console
|
|
5
|
+
|
|
6
|
+
from ytstudio.api import authenticate, get_status
|
|
7
|
+
from ytstudio.commands import analytics, comments, videos
|
|
8
|
+
from ytstudio.config import setup_credentials
|
|
9
|
+
from ytstudio.version import get_current_version, is_update_available
|
|
10
|
+
|
|
11
|
+
app = typer.Typer(
|
|
12
|
+
name="ytstudio",
|
|
13
|
+
help="Manage your YouTube channel from the terminal",
|
|
14
|
+
no_args_is_help=True,
|
|
15
|
+
rich_markup_mode="markdown",
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
console = Console()
|
|
19
|
+
|
|
20
|
+
app.add_typer(videos.app, name="videos")
|
|
21
|
+
app.add_typer(analytics.app, name="analytics")
|
|
22
|
+
app.add_typer(comments.app, name="comments")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@app.command()
|
|
26
|
+
def init(
|
|
27
|
+
client_secrets_file: str = typer.Option(
|
|
28
|
+
None,
|
|
29
|
+
"--client-secrets",
|
|
30
|
+
"-c",
|
|
31
|
+
help="Path to Google OAuth client secrets JSON file",
|
|
32
|
+
),
|
|
33
|
+
):
|
|
34
|
+
"""Initialize with Google OAuth credentials"""
|
|
35
|
+
setup_credentials(client_secrets_file)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@app.command()
|
|
39
|
+
def login():
|
|
40
|
+
"""Authenticate with YouTube via OAuth"""
|
|
41
|
+
authenticate()
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@app.command()
|
|
45
|
+
def status():
|
|
46
|
+
"""Show current authentication status"""
|
|
47
|
+
get_status()
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
_update_state = {"registered": False}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def _show_update_notification():
|
|
54
|
+
try:
|
|
55
|
+
available, latest = is_update_available()
|
|
56
|
+
if available:
|
|
57
|
+
console.print(
|
|
58
|
+
f"\n[cyan]Update available: {get_current_version()} → {latest}[/cyan]\n"
|
|
59
|
+
f"Run: [bold]uv tool upgrade ytstudio-cli[/bold]"
|
|
60
|
+
)
|
|
61
|
+
except Exception:
|
|
62
|
+
pass # Silent on errors
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
@app.callback(invoke_without_command=True)
|
|
66
|
+
def main(
|
|
67
|
+
show_version: bool = typer.Option(False, "--version", "-v", help="Show version"),
|
|
68
|
+
):
|
|
69
|
+
"""ytstudio - Manage your YouTube channel from the terminal"""
|
|
70
|
+
if show_version:
|
|
71
|
+
console.print(f"ytstudio v{get_current_version()}")
|
|
72
|
+
raise typer.Exit()
|
|
73
|
+
|
|
74
|
+
if not _update_state["registered"]:
|
|
75
|
+
atexit.register(_show_update_notification)
|
|
76
|
+
_update_state["registered"] = True
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
if __name__ == "__main__":
|
|
80
|
+
app()
|