diff --git a/.gitignore b/.gitignore index 4cabf51..fd4eb37 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules/ dist/ -play-dl/Stream/stream_final.ts \ No newline at end of file +.npmrc \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 79a65ac..b75a482 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "play-dl", - "version": "0.2.1", + "version": "0.2.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "play-dl", - "version": "0.2.1", + "version": "0.2.4", "license": "MIT", "dependencies": { "got": "^11.8.2" diff --git a/package.json b/package.json index fe8af06..68994bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "play-dl", - "version": "0.2.1", + "version": "0.2.4", "description": "YouTube, SoundCloud, Spotify downloader", "main": "dist/index.js", "typings": "dist/index.d.ts", @@ -10,7 +10,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/play-dl/play-dl" + "url": "https://github.com/play-dl/play-dl" }, "keywords": [ "node-youtube-dl", diff --git a/play-dl/YouTube/utils/extractor.ts b/play-dl/YouTube/utils/extractor.ts index d629087..6bb2b7b 100644 --- a/play-dl/YouTube/utils/extractor.ts +++ b/play-dl/YouTube/utils/extractor.ts @@ -4,7 +4,7 @@ import { Video } from '../classes/Video' import { PlayList } from '../classes/Playlist' const DEFAULT_API_KEY = "AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"; -const video_pattern = /^((?:https?:)?\/\/)?:(?:(?:www|m)\.)?((?:youtube\.com|youtu.be))(\/(?:[\w\-]+\?v=|embed\/|v\/)?)([\w\-]+)(\S+)?$/; +const video_pattern = /^((?:https?:)?\/\/)?(?:(?:www|m)\.)?((?:youtube\.com|youtu.be))(\/(?:[\w\-]+\?v=|embed\/|v\/)?)([\w\-]+)(\S+)?$/; export async function video_basic_info(url : string){ if(!url.match(video_pattern)) throw new Error('This is not a YouTube URL')