dougdudu

get_info

Sep 18th, 2020
837
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from pytube import YouTube
  2. from sys import argv
  3. import json
  4.  
  5. yt = YouTube(argv[1])
  6.  
  7. print(json.dumps({
  8.     "title": yt.title,
  9.     "thumbnail_url": yt.thumbnail_url,
  10.     "length": yt.length
  11. }))
RAW Paste Data