Use HTTPS for querying YouTube

HTTP is no longer supported by YouTube.
This commit is contained in:
Martchus 2019-08-20 22:28:07 +02:00
parent 566639c6cb
commit b323f2d7aa
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ YoutubeDownload::YoutubeDownload(const QUrl &url, QObject *parent)
* \brief Constructs a new YoutubeDownload for the specified video \a id. * \brief Constructs a new YoutubeDownload for the specified video \a id.
*/ */
YoutubeDownload::YoutubeDownload(const QString &id, QObject *parent) YoutubeDownload::YoutubeDownload(const QString &id, QObject *parent)
: HttpDownloadWithInfoRequst(QUrl(QStringLiteral("http://www.youtube.com/watch?v=%1").arg(id)), parent) : HttpDownloadWithInfoRequst(QUrl(QStringLiteral("https://www.youtube.com/watch?v=%1").arg(id)), parent)
{ {
} }
@ -52,7 +52,7 @@ Download *YoutubeDownload::infoRequestDownload(bool &success, QString &reasonFor
} else { } else {
setId(videoId); setId(videoId);
success = true; success = true;
return new HttpDownload(QUrl(QStringLiteral("http://www.youtube.com/get_video_info?video_id=%1&asv=3&el=detailpage&hl=en_US").arg(videoId))); return new HttpDownload(QUrl(QStringLiteral("https://www.youtube.com/get_video_info?video_id=%1&asv=3&el=detailpage&hl=en_US").arg(videoId)));
} }
} }