https://github.com/dedinc/ytty
Powerful tool for parsing, downloading and uploading videos from youtube based on selenium.
https://github.com/dedinc/ytty
parse-youtube python-youtube python-youtube-api python3 youtube-management youtube-manager youtube-parser ytty
Last synced: about 1 month ago
JSON representation
Powerful tool for parsing, downloading and uploading videos from youtube based on selenium.
- Host: GitHub
- URL: https://github.com/dedinc/ytty
- Owner: DedInc
- License: mit
- Created: 2022-08-04T07:06:26.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-03T05:28:44.000Z (over 1 year ago)
- Last Synced: 2025-03-09T13:03:34.185Z (about 2 months ago)
- Topics: parse-youtube, python-youtube, python-youtube-api, python3, youtube-management, youtube-manager, youtube-parser, ytty
- Language: Python
- Homepage: https://pypi.org/project/ytty
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
Ytty - Powerful tool for parsing, downloading and uploading videos from youtube based on selenium.
-WARINING!!!-
```
You must have Google Chrome installed for google auth bypass!
```-How to use?-
-Quickstart-
```python
from ytty import *if __name__ == '__main__':
session = shadow_session()
options = YTOptions()
options.parse.search = 'FREE FIRE MOD MENU'
options.parse.period = 1
options.parse.max = 10
videos = parse_videos(session, options)
video = get_video(videos[0]['link'])
session.quit()session = google_session('login', 'password')
options.upload.video = video
options.upload.title = videos[0]['title']
options.upload.description = '''This you can write description for video
That text written for example, you can write this what do you want :)'''
options.upload.tags = ['tags', 'writes', 'in a', 'taglist', 'add', 'some tags', 'this']
options.upload.preview = get_thumbnail(videos[0]['id'])
upload_video(session, options)
```-Parsing videos-
```python
from ytty import *if __name__ == '__main__':
session = shadow_session() #headless chrome session without login
options = YTOptions()
options.parse.search = 'FREE FIRE MOD MENU' #Search request
options.parse.period = 1 #Period from 0 to 2 when -> 0 - Today | 1 - a Week | 2 - a Month (Default is 2)
options.parse.max = 10 #Limit of parsing video (Default is 20)videos = parse_videos(session, options)
for video in videos:
title = video['title'] #video title
link = video['link'] #video link
id = video['id'] #video id
session.quit() #For close session
```-Download thumbnails (previews)-
```python
for video in videos:
get_thumbnail(video['id']) #returns filename of preview
```-Download videos-
```python
for video in videos:
get_video(video['link']) #returns filename of video
```-Download video with uniqualization-
```python
for video in videos:
options = YTOptions()
options.download.unique = True # if use vidspinner (ffmpeg to uniqualize, but it for Windows only)
get_video(video['link'], options)
```-Upload videos-
```python
for video in videos:
session = google_session('login', 'password') #session with login in google (no headless)
options = YTOptions()
options.upload.video = 'C:/path-to/video.mp4'
options.upload.title = videos[0]['title']
options.upload.description = '''This you can write description for video
That text written for example, you can write this what do you want :)'''
options.upload.tags = ['tags', 'writes', 'in a', 'taglist', 'add', 'some tags', 'this']
options.upload.preview = 'C:/path-to/thumbnails.jpg'upload_video(session, options)
```-Upload video as premiere and access management-
```python
for video in videos:
options.upload.acess = 'PUBLIC' #is default | UNLISTED - Acess by link | PRIVATE - Restricted access | SCHEDULE - Planned release (not yet configurable)
options.upload.premiere = True
```