-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yusuf Usta
committed
Nov 14, 2021
1 parent
4f0db0d
commit 4fdbc32
Showing
5 changed files
with
32 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,4 +136,5 @@ dmypy.json | |
|
||
# Cython debug symbols | ||
cython_debug/ | ||
.DS_store | ||
.DS_store | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
# Youtube Studio | ||
Unofficial Async YouTube Studio API. Set of features limited or not provided by official YouTube API | ||
|
||
Unofficial Async YouTube Studio API. Set of features limited or not provided by official YouTube API | ||
|
||
> This is the Python version of [this project](https://github.com/adasq/youtube-studio). All thanks going to [@adasq](https://github.com/adasq) :) | ||
## Installation | ||
|
||
You can install with PIP. | ||
|
||
`pip install ytstudio` | ||
|
||
## Features | ||
## Features | ||
|
||
- Async | ||
- Uploading Video (**NOT LIMITED** - official API's videos.insert charges you 1600 quota units) | ||
- Deleting Video | ||
|
||
## Examples | ||
**Note:** You need cookies. Use an cookie manager([EditThisCookie](https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg?hl=tr)) for needed cookies. | ||
|
||
**Note:** You need cookies. Use an cookie manager([EditThisCookie](https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg?hl=tr)) for needed cookies. | ||
|
||
### Upload Video | ||
|
||
> You need SESSION_TOKEN for upload video. [How to get Session Token?](https://github.com/adasq/youtube-studio#preparing-authentication) | ||
```py | ||
from ytstudio import Studio | ||
import asyncio | ||
|
@@ -30,15 +36,17 @@ def progress(uploaded, total): | |
async def main(): | ||
yt = Studio({'VISITOR_INFO1_LIVE': '', 'PREF': '', 'LOGIN_INFO': '', 'SID': '', '__Secure-3PSID': '', 'HSID': '', 'SSID': '', 'APISID': '', 'SAPISID': '', '__Secure-3PAPISID': '', 'YSC': '', 'SIDCC': ''}) | ||
await yt.login() | ||
sonuc = await yt.uploadVideo(os.path.join(os.getcwd(), "deneme.mp4"), title="Hello World!", description="Uploaded by github.com/yusufusta/ytstudio" progress=progress) | ||
sonuc = await yt.uploadVideo(os.path.join(os.getcwd(), "deneme.mp4"), title="Hello World!", description="Uploaded by github.com/yusufusta/ytstudio", progress=progress) | ||
print(sonuc['videoId']) # Print Video ID | ||
|
||
loop = asyncio.get_event_loop() | ||
loop.run_until_complete(main()) | ||
``` | ||
|
||
## Author | ||
|
||
Yusuf Usta, [email protected] | ||
|
||
## Note | ||
This library is in no way affiliated with YouTube or Google. Use at your own discretion. Do not spam with this. | ||
|
||
This library is in no way affiliated with YouTube or Google. Use at your own discretion. Do not spam with this. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters