--- resources/services/youtube/youtube.js 2010/09/02 11:52:07 911 +++ resources/services/youtube/youtube.js 2011/08/06 23:30:28 961 @@ -3,7 +3,7 @@ * This file is part of xVideoServiceThief, * an open-source cross-platform Video service download * -* Copyright (C) 2007 - 2010 Xesc & Technology +* Copyright (C) 2007 - 2011 Xesc & Technology * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,9 +25,9 @@ function RegistVideoService() { - this.version = "2.1.5"; + this.version = "3.0.1"; this.minVersion = "2.0.0a"; - this.author = "Xesc & Technology 2009"; + this.author = "Xesc & Technology 2011"; this.website = "http://www.youtube.com/"; this.ID = "youtube.com"; this.caption = "YouTube"; @@ -55,32 +55,103 @@ // download webpage var http = new Http(); var html = http.downloadWebpage(youTubeURL); + // get cookies + result.cookies = http.getCookies("|"); // get the video title result.title = copyBetween(html, "
'; + const HTML_SEARCH_SUMMARY_END = '
'; // replace all spaces for "+" keyWord = strReplace(keyWord, " ", "+"); // init search results object @@ -110,7 +183,7 @@ var http = new Http(); var html = http.downloadWebpage(strFormat(URL_SEARCH, keyWord, pageIndex, searchResults.getUserLanguage())); // get the search summary - var summary = copyBetween(html, '', '
')); // get rating