Wednesday 22 April 2015

Youtube Downloader&Scraper (Python Script)

Hi Guys,

This script scrapes Youtube video's to get direct download links, a third party website is used to scrape the Youtube video's and then the script scrapes the third party website.

The script can be used to download Youtube video's or just scrape the direct download links and save them to a file, useful for uses that want to use a download manager instead of the script to download the video's.

The script can download single video's or multiple from a file.

How to download:


Single link Download

Replace the "yt" variable in the script with your Youtube link.

yt = "https://www.youtube.com/watch?v=xxxxxxxxxxx"

(OR)

Multi link Download

Load multiple Youtube links from a file by drag and dropping it on to the script.
NOTE:Must be a ".txt" file

Settings:

To change settings edit the "settings" variable in the script.

settings = {"quality" : "5",
   "download" : True,
   "save" : True,
   "debug" : True,
   "debug2" : False}

Quality: 0)  HD720
              1)  Medium webm
              2)  Medium mp4
              3)  Small x-flv
              4)  Small 3gpp
              5)  Smallest 3gpp

Download: Download video after scape if "True"

Save: Save scraped links to file if "True"

Debug: Enable debug output.

Debug2: Extra redundant debug output.

Download:

Mediafire

Requirements:

-Python 2.7

Note:

Youtube direct video links are most likely ip specific meaning you won't be able the directly share the links with others, only you will be able the use the scraped link to download the video. The scraped video links do have a ip variable in the url, changing the value might allow you to directly share the links but I have not tried it.

Bugs:

Videos without the right quality's available might cause the script to crash, usually very small video's don't have them.

Feel free to use the comments below to report any bug's, ask to modified the script or just leave a comment.

No comments:

Post a Comment