Powerful tool for parsing, downloading and uploading videos from youtube based on selenium.
PythonMIT
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-
fromyttyimport*if__name__=='__main__':
session=shadow_session()
options=YTOptions()
options.parse.search='FREE FIRE MOD MENU'options.parse.period=1options.parse.max=10videos=parse_videos(session, options)
video=get_video(videos[0]['link'])
session.quit()
session=google_session('login', 'password')
options.upload.video=videooptions.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-
fromyttyimport*if__name__=='__main__':
session=shadow_session() #headless chrome session without loginoptions=YTOptions()
options.parse.search='FREE FIRE MOD MENU'#Search requestoptions.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)
forvideoinvideos:
title=video['title'] #video titlelink=video['link'] #video linkid=video['id'] #video idsession.quit() #For close session
-Download thumbnails (previews)-
forvideoinvideos:
get_thumbnail(video['id']) #returns filename of preview
-Download videos-
forvideoinvideos:
get_video(video['link']) #returns filename of video
-Download video with uniqualization-
forvideoinvideos:
options=YTOptions()
options.download.unique=True# if use vidspinner (ffmpeg to uniqualize, but it for Windows only)get_video(video['link'], options)
-Upload videos-
forvideoinvideos:
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)