Downcutup, biblioteca para Python de utilidades web y Youtube

in downcutup •  7 months ago


Utilidades web y de la API de Youtube en Python3.

Download here





First, you have to install FFMPEG for some functions. Check how to do it in your OS.

pdfkit, pytube & youtube-upload

sudo apt-get install wkhtmltopdf
sudo pip3 install pdfkit && sudo pip3 install pytube

sudo pip3 install --upgrade google-api-python-client progressbar2
cd youtube-upload-master
sudo python3 install
PYTHONPATH=. python bin/youtube-upload

git clone

You are free to expand the library!


from downcutup import *

# ------------   YOUTUBE UTILITIES ----------------
URL = ''

# Download video:    (As default in .mp4 with the best video quality)
download_video(URL,  # A url (str)
               save_in=None, # As default, the root dir
                             # (you can edit it in file)
               filename_out=None, # As default, video name in youtube
               verbose=True) # As default in all functions, 
                             # prints advices in the process
   # Return:
      # (str) Name of the file --> 'Instalaciones downcutup.mp4'

# -----------------------------
# Cut video:
# First download a video and save the return.

video_name = download_video(URL)
cut(config.PATH + video_name,  # Filename in
    t1='00:01:10',     # (str) 'Hour:min:sec' 
    t2='00:01:20',     # (str) 'Hour:min:sec' 
    config.PATH + 'cutted_' + video_name) # Filename_out

# -----------------------------

# Download audio:   (As default in .wav with the best sound quality possible)
               filename_out=None, # Filename_out
               t1=None,    # (str) 'Hour:min:sec' 
               t2=None)    # (str) 'Hour:min:sec'
   # Return:
      # (str) Name of the file ---> 'Instalaciones downcutup.mp4'

# -----------------------------
# Downcutup:
# (Download., cut, and upload the cutted part of a video)

downcutup(URL,'Install WkHtmltoPdf',        # Title
              'How to install WkHtmltoPdf', # Description
              '00:01:00',    # start time
              '00:01:20',     # end time
              category=None,  # Configure options in the upload
              playlist=None, # Insert in a playlist
              privacy=None, # 'public' as default. 
                            # (Insert privacy='private' if you don't want publish it
                            # or 'ocult' if  you want upload but that don't
                            # appears in your page channel
              thumbnail=None,  # Insert a thumbnail image 

       #  Return:
           (str) New video url. 

# -----------------------------------------
# Youtube upload (upload a video to Youtube):
youtube_upload(URL,'Install WkHtmltoPdf',        # Title
              'How to install WkHtmltoPdf',      # Description
              '00:01:00',    # start time
              '00:01:20',     # end time
              **kwargs)  # The kwargs are the same than before function

# ------------   WEB UTILITIES ----------------
from web import *

# Download web in pdf:
              filename_out=None) # As default is the  web's title

# Download image:
                filename_out=None) # As default is the image name
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  trending

Congratulations @mondeja! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on any badge to view your own Board of Honnor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

If you want to support the SteemitBoard project, your upvote for this notification is welcome!