diff options
author | Arun Isaac | 2017-07-06 03:22:54 +0530 |
---|---|---|
committer | Arun Isaac | 2017-07-06 03:22:54 +0530 |
commit | e2758781c87189f2ee6e128790ad4b26ba148d43 (patch) | |
tree | c056f1348bd55a4e94a67347ae59456f00ab947c | |
parent | 15de5cbbb1e821fd599536e0fc86d45b06a7baa1 (diff) | |
download | youtube-noscript-shim-e2758781c87189f2ee6e128790ad4b26ba148d43.tar.gz youtube-noscript-shim-e2758781c87189f2ee6e128790ad4b26ba148d43.tar.lz youtube-noscript-shim-e2758781c87189f2ee6e128790ad4b26ba148d43.zip |
Do not extract video title.
* viewtube.js: Do not extract video title (ytVideoTitle).
-rw-r--r-- | viewtube.js | 15 |
1 files changed, 0 insertions, 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(); } |