]> git.sur5r.net Git - minitube/commitdiff
Workaround the new YouTube URLs
authorFlavio Tordini <flavio.tordini@gmail.com>
Tue, 15 Sep 2009 21:06:27 +0000 (23:06 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Tue, 15 Sep 2009 21:06:27 +0000 (23:06 +0200)
src/video.cpp

index c4c3575955c077264ca9ac99e0679c0684095ba0..0fb30b3cbb6b4d65ee22a39b94c5e7f3b3efb767 100644 (file)
@@ -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()));