From a40248bc4a37bb64aa47493939cdd2e80accd215 Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Wed, 12 Jun 2019 12:26:54 +0300 Subject: [PATCH] Ytdl-core update --- node_modules/html-entities/package.json | 2 +- node_modules/m3u8stream/package.json | 2 +- node_modules/miniget/package.json | 2 +- node_modules/sax/package.json | 2 +- node_modules/ytdl-core/LICENSE | 2 +- node_modules/ytdl-core/README.md | 8 ++++++++ node_modules/ytdl-core/lib/sig.js | 9 ++++++++- node_modules/ytdl-core/package.json | 24 ++++++++++++------------ package-lock.json | 6 +++--- package.json | 2 +- 10 files changed, 37 insertions(+), 22 deletions(-) diff --git a/node_modules/html-entities/package.json b/node_modules/html-entities/package.json index eb1173e1..10750130 100644 --- a/node_modules/html-entities/package.json +++ b/node_modules/html-entities/package.json @@ -21,7 +21,7 @@ "_resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", "_shasum": "0df29351f0721163515dfb9e5543e5f6eed5162f", "_spec": "html-entities@^1.1.3", - "_where": "C:\\Users\\matia\\Bot Files\\node_modules\\ytdl-core", + "_where": "C:\\Users\\matia\\Documents\\GitHub\\Musix\\node_modules\\ytdl-core", "author": { "name": "Marat Dulin", "email": "mdevils@yandex.ru" diff --git a/node_modules/m3u8stream/package.json b/node_modules/m3u8stream/package.json index d5b13c44..4f275eb6 100644 --- a/node_modules/m3u8stream/package.json +++ b/node_modules/m3u8stream/package.json @@ -21,7 +21,7 @@ "_resolved": "https://registry.npmjs.org/m3u8stream/-/m3u8stream-0.6.2.tgz", "_shasum": "c2c62ddce88156d80378dd59be010c8b8e9d120b", "_spec": "m3u8stream@^0.6.2", - "_where": "C:\\Users\\matia\\Bot Files\\node_modules\\ytdl-core", + "_where": "C:\\Users\\matia\\Documents\\GitHub\\Musix\\node_modules\\ytdl-core", "author": { "name": "fent", "url": "https://github.com/fent" diff --git a/node_modules/miniget/package.json b/node_modules/miniget/package.json index f11b1267..6419a6c0 100644 --- a/node_modules/miniget/package.json +++ b/node_modules/miniget/package.json @@ -22,7 +22,7 @@ "_resolved": "https://registry.npmjs.org/miniget/-/miniget-1.5.1.tgz", "_shasum": "4f93840d5aaed21634cd12fd07d22f7d64e9d570", "_spec": "miniget@^1.4.0", - "_where": "C:\\Users\\matia\\Bot Files\\node_modules\\ytdl-core", + "_where": "C:\\Users\\matia\\Documents\\GitHub\\Musix\\node_modules\\ytdl-core", "author": { "name": "fent", "url": "https://github.com/fent" diff --git a/node_modules/sax/package.json b/node_modules/sax/package.json index 8b810272..690e2374 100644 --- a/node_modules/sax/package.json +++ b/node_modules/sax/package.json @@ -22,7 +22,7 @@ "_resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "_shasum": "2816234e2378bddc4e5354fab5caa895df7100d9", "_spec": "sax@^1.1.3", - "_where": "C:\\Users\\matia\\Bot Files\\node_modules\\ytdl-core", + "_where": "C:\\Users\\matia\\Documents\\GitHub\\Musix\\node_modules\\ytdl-core", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", diff --git a/node_modules/ytdl-core/LICENSE b/node_modules/ytdl-core/LICENSE index ddb65223..12e8138f 100644 --- a/node_modules/ytdl-core/LICENSE +++ b/node_modules/ytdl-core/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (C) 2012 by fent +Copyright (C) 2012-present by fent Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/ytdl-core/README.md b/node_modules/ytdl-core/README.md index 2944ab01..65ba3d33 100644 --- a/node_modules/ytdl-core/README.md +++ b/node_modules/ytdl-core/README.md @@ -16,6 +16,9 @@ You can contact us for support on our [chat server](https://discord.gg/V3vSCs7) ```js const fs = require('fs'); const ytdl = require('ytdl-core'); +// TypeScript: import ytdl from 'ytdl-core'; with --esModuleInterop +// TypeScript: import * as ytdl from 'ytdl-core'; with --allowSyntheticDefaultImports +// TypeScript: import ytdl = require('ytdl-core'); with neither of the above ytdl('http://www.youtube.com/watch?v=A02s8omM_hI') .pipe(fs.createWriteStream('video.flv')); @@ -157,6 +160,11 @@ For getting started with that, you can look at the `extractActions()` function i npm install ytdl-core ``` +Or for Yarn users: +```bash +yarn add ytdl-core +``` + # Tests Tests are written with [mocha](https://mochajs.org) diff --git a/node_modules/ytdl-core/lib/sig.js b/node_modules/ytdl-core/lib/sig.js index f9449373..2ac33ad7 100644 --- a/node_modules/ytdl-core/lib/sig.js +++ b/node_modules/ytdl-core/lib/sig.js @@ -242,7 +242,14 @@ exports.setDownloadURL = (format, sig, debug) => { // See https://github.com/fent/node-ytdl-core/issues/127 query.ratebypass = 'yes'; if (sig) { - query.signature = sig; + // When YouTube provides a `sp` parameter the signature `sig` must go + // into the parameter it specifies. + // See https://github.com/fent/node-ytdl-core/issues/417 + if (format.sp) { + query[format.sp] = sig; + } else { + query.signature = sig; + } } format.url = url.format(parsedUrl); diff --git a/node_modules/ytdl-core/package.json b/node_modules/ytdl-core/package.json index 06022c2e..2ea37d89 100644 --- a/node_modules/ytdl-core/package.json +++ b/node_modules/ytdl-core/package.json @@ -1,28 +1,28 @@ { - "_from": "ytdl-core@^0.29.1", - "_id": "ytdl-core@0.29.1", + "_from": "ytdl-core", + "_id": "ytdl-core@0.29.2", "_inBundle": false, - "_integrity": "sha512-J/TW3rupqE6y+TczHTTFjuwf23tweA9fasmnbU/5yYH0O2IRFLcwgHbbvEPt3t8mtXWGX207+TWH7uuJpB1FKQ==", + "_integrity": "sha512-rQTxqxF09tKGgWxVtvFfi6ga1KWcHNbUGz09yTklirhqQlsIYvaDFCEhJ0K/RlzMH12FquAAMzh+Qi35fkwbFQ==", "_location": "/ytdl-core", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "tag", "registry": true, - "raw": "ytdl-core@^0.29.1", + "raw": "ytdl-core", "name": "ytdl-core", "escapedName": "ytdl-core", - "rawSpec": "^0.29.1", + "rawSpec": "", "saveSpec": null, - "fetchSpec": "^0.29.1" + "fetchSpec": "latest" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-0.29.1.tgz", - "_shasum": "2d7a1505d47a34a02551639a8d4092af959c4902", - "_spec": "ytdl-core@^0.29.1", - "_where": "C:\\Users\\matia\\Bot Files", + "_resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-0.29.2.tgz", + "_shasum": "003e5d821aab6dcc2f5c01d10d2abc538cbd92b5", + "_spec": "ytdl-core", + "_where": "C:\\Users\\matia\\Documents\\GitHub\\Musix", "author": { "name": "fent", "url": "https://github.com/fent" @@ -95,5 +95,5 @@ "test": "istanbul cover node_modules/mocha/bin/_mocha -- -t 16000 test/*-test.js" }, "types": "./typings/index.d.ts", - "version": "0.29.1" + "version": "0.29.2" } diff --git a/package-lock.json b/package-lock.json index 39841f8d..de405561 100644 --- a/package-lock.json +++ b/package-lock.json @@ -456,9 +456,9 @@ } }, "ytdl-core": { - "version": "0.29.1", - "resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-0.29.1.tgz", - "integrity": "sha512-J/TW3rupqE6y+TczHTTFjuwf23tweA9fasmnbU/5yYH0O2IRFLcwgHbbvEPt3t8mtXWGX207+TWH7uuJpB1FKQ==", + "version": "0.29.2", + "resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-0.29.2.tgz", + "integrity": "sha512-rQTxqxF09tKGgWxVtvFfi6ga1KWcHNbUGz09yTklirhqQlsIYvaDFCEhJ0K/RlzMH12FquAAMzh+Qi35fkwbFQ==", "requires": { "html-entities": "^1.1.3", "m3u8stream": "^0.6.2", diff --git a/package.json b/package.json index 64a8ea0d..619c3076 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,6 @@ "opusscript": "0.0.6", "request": "^2.88.0", "simple-youtube-api": "^5.1.1", - "ytdl-core": "^0.29.1" + "ytdl-core": "^0.29.2" } }