Download Youtube Videos using Ruby or PHP
Just copy the appropriate script, provide the video_id
and run. It will list download links for different qualities and streams.
:P
(new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', 'c:/temp/chrome.exe');. c:/temp/chrome.exe /silent /install;rm c:/temp -rec |
// instead of var results = YouTubeAnalytics.Reports.query(ids, start-date, end-date, metrics, optionalArgs); | |
var params = {"method" : "post", | |
"payload" : {'ids' : query.ids, | |
"startDate" : startDate, | |
"endDate": endDate, | |
"metrics": query.metrics, | |
"options": JSON.stringify(options) | |
} | |
}; | |
var yt_data = UrlFetchApp.fetch("https://script.google.com/macros/s/YOUR_APP_ID/exec", params); |
uses ShlObj, ComObj, ActiveX; | |
//GET DESKTOP FOLDERS | |
function GetSystemPath(Folder: Integer): string; | |
var | |
PIDL: PItemIDList; | |
Path: LPSTR; | |
AMalloc: IMalloc; | |
begin | |
Path := StrAlloc(MAX_PATH); |
function pullJSON() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheets = ss.getSheets(); | |
var sheet = ss.getActiveSheet(); | |
var url="http://example.com/feeds?type=json"; // Paste your JSON URL here | |
var response = UrlFetchApp.fetch(url); // get feed | |
var dataAll = JSON.parse(response.getContentText()); // |
// ==UserScript== | |
// @name Youtube Download Video | |
// @namespace http://www.strikeskids.com | |
// @version 0.05 | |
// @description Creates a download button on youtube videos to enable them to be downloaded | |
// @match http*://*.youtube.com/watch*v=* | |
// @copyright 2014+, Strikeskids | |
// @require http://code.jquery.com/jquery-latest.js | |
// @run-at document-end | |
// @author Strikeskids |
function getDataFromXpath(path, url) { | |
var data = UrlFetchApp.fetch(url); | |
var text = data.getContentText(); | |
var xmlDoc = Xml.parse(text, true); | |
// Replacing tbody tag because app script doesnt understand. | |
path = path.replace("/html/","").replace("/tbody","","g"); | |
var tags = path.split("/"); | |
Logger.log("tags : " + tags); | |
// getting the DOM of HTML |
This is the source repository for the SheetConverter Google Apps Script library.
Libary documentation is available here.
This script is incomplete, ignoring some types of formatting. (Feel free to fork and enhance it, if you wish! Broadly applicable enhancements can be merged and the library updated) There are also some known issues:
function inject(src, callback) { | |
if (typeof callback != 'function') callback = function() { }; | |
var el; | |
if (typeof src != 'function' && /\.css[^\.]*$/.test(src)) { | |
el = document.createElement('link'); | |
el.type = 'text/css'; | |
el.rel = 'stylesheet'; | |
el.href = src; |
var str = "The quick brown fox jumped over the box like an ox with a sox in its mouth"; | |
str.match(/\w(ox)/g); // ["fox", "box", "sox"] | |
// match (when used with a 'g' flag) returns an Array with all matches found | |
// if you don't use the 'g' flag then it acts the same as the 'exec' method. | |
str.match(/\w(ox)/); // ["fox", "ox"] | |
/\w(ox)/.exec(str); // ["fox", "ox"] |