From e2758781c87189f2ee6e128790ad4b26ba148d43 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 6 Jul 2017 03:22:54 +0530 Subject: Do not extract video title. * viewtube.js: Do not extract video title (ytVideoTitle). --- viewtube.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/viewtube.js b/viewtube.js index 10106db..c4180f9 100644 --- a/viewtube.js +++ b/viewtube.js @@ -543,19 +543,6 @@ if (ytVideoID) ytVideoThumb = 'https://img.youtube.com/vi/' + ytVideoID[2] + '/0.jpg'; } - /* Get Video Title */ - var ytVideoTitle = getMyContent(page.url, 'meta\\s+itemprop="name"\\s+content="(.*?)"', false); - if (!ytVideoTitle) ytVideoTitle = getMyContent(page.url, 'meta\\s+property="og:title"\\s+content="(.*?)"', false); - if (!ytVideoTitle) ytVideoTitle = page.doc.title; - if (ytVideoTitle) { - ytVideoTitle = ytVideoTitle.replace(/"/g, '\'').replace(/"/g, '\'').replace(/"/g, '\''); - ytVideoTitle = ytVideoTitle.replace(/'/g, '\'').replace(/'/g, '\''); - ytVideoTitle = ytVideoTitle.replace(/&/g, 'and').replace(/&/g, 'and'); - ytVideoTitle = ytVideoTitle.replace(/\?/g, '').replace(/[#:\*]/g, '-').replace(/\//g, '-'); - ytVideoTitle = ytVideoTitle.replace(/^\s+|\s+$/, '').replace(/\.+$/g, ''); - ytVideoTitle = ytVideoTitle.replace(/^YouTube\s-\s/, ''); - } - /* Get Videos Content */ var ytVideosEncodedFmts, ytVideosAdaptiveFmts, ytVideosContent, ytHLSVideos, ytHLSContent; ytVideosEncodedFmts = getMyContent(page.url, '"url_encoded_fmt_stream_map":\\s*"(.*?)"', false); @@ -648,7 +635,6 @@ 'videoList': ytVideoList, 'videoPlay': ytDefaultVideo, 'videoThumb': ytVideoThumb, - 'videoTitle': ytVideoTitle, 'playerWidth': ytPlayerWidth, 'playerHeight': ytPlayerHeight, 'playerWideWidth': ytPlayerWideWidth, @@ -814,7 +800,6 @@ /* DVL */ ytVideoList['Direct Video Link'] = page.url; - ytVideoTitle = null; ytDefaultVideo = 'Any Definition MP4'; ytPlayer(); } -- cgit v1.2.3