mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 09:51:13 +02:00
ytparser: fix not supported HTTP
Origin commit data
------------------
Commit: b4c0a08946
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2019-05-28 (Tue, 28 May 2019)
This commit is contained in:
@@ -158,7 +158,7 @@ bool cYTFeedParser::getUrl(std::string &url, std::string &answer, CURL *_curl_ha
|
|||||||
printf("try to get [%s] ...\n", url.c_str());
|
printf("try to get [%s] ...\n", url.c_str());
|
||||||
CURLcode httpres = curl_easy_perform(_curl_handle);
|
CURLcode httpres = curl_easy_perform(_curl_handle);
|
||||||
|
|
||||||
printf("http: res %d size %d\n", httpres, (int)answer.size());
|
printf("https: res %d size %d\n", httpres, (int)answer.size());
|
||||||
|
|
||||||
if (httpres != 0 || answer.empty()) {
|
if (httpres != 0 || answer.empty()) {
|
||||||
printf("error: %s\n", cerror);
|
printf("error: %s\n", cerror);
|
||||||
@@ -203,7 +203,7 @@ bool cYTFeedParser::DownloadUrl(std::string &url, std::string &file, CURL *_curl
|
|||||||
curl_easy_getinfo(_curl_handle, CURLINFO_SIZE_DOWNLOAD, &dsize);
|
curl_easy_getinfo(_curl_handle, CURLINFO_SIZE_DOWNLOAD, &dsize);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
printf("http: res %d size %g.\n", httpres, dsize);
|
printf("https: res %d size %g.\n", httpres, dsize);
|
||||||
|
|
||||||
if (httpres != 0) {
|
if (httpres != 0) {
|
||||||
printf("curl error: %s\n", cerror);
|
printf("curl error: %s\n", cerror);
|
||||||
@@ -587,7 +587,7 @@ bool cYTFeedParser::ParseVideoInfo(cYTVideoInfo &vinfo, CURL *_curl_handle)
|
|||||||
estr.push_back("&el=detailpage");
|
estr.push_back("&el=detailpage");
|
||||||
|
|
||||||
for (unsigned i = 0; i < estr.size(); i++) {
|
for (unsigned i = 0; i < estr.size(); i++) {
|
||||||
std::string vurl = "http://www.youtube.com/get_video_info?video_id=";
|
std::string vurl = "https://www.youtube.com/get_video_info?video_id=";
|
||||||
vurl += vinfo.id;
|
vurl += vinfo.id;
|
||||||
vurl += estr[i];
|
vurl += estr[i];
|
||||||
vurl += "&ps=default&eurl=&gl=US&hl=en";
|
vurl += "&ps=default&eurl=&gl=US&hl=en";
|
||||||
|
Reference in New Issue
Block a user