From: Flavio Tordini Date: Tue, 15 Sep 2009 21:06:27 +0000 (+0200) Subject: Workaround the new YouTube URLs X-Git-Tag: 0.6.1~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fe37e0824b725d2b6cb9163bc21e41618ab3e6ef;p=minitube Workaround the new YouTube URLs --- diff --git a/src/video.cpp b/src/video.cpp index c4c3575..0fb30b3 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -36,7 +36,7 @@ void Video::scrapeStreamUrl() { // Get Video ID // youtube-dl line 428 // QRegExp re("^((?:http://)?(?:\\w+\\.)?youtube\\.com/(?:(?:v/)|(?:(?:watch(?:\\.php)?)?\\?(?:.+&)?v=)))?([0-9A-Za-z_-]+)(?(1).+)?$"); - QRegExp re("^http://www\\.youtube\\.com/watch\\?v=([0-9A-Za-z_-]+)$"); + QRegExp re("^http://www\\.youtube\\.com/watch\\?v=([0-9A-Za-z_-]+).*"); bool match = re.exactMatch(webpage.toString()); if (!match || re.numCaptures() < 1) { emit errorStreamUrl(QString("Cannot get video id for %1").arg(webpage.toString()));