From dce4ad17f45042ff27004368e8eed958a8bda991 Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Fri, 13 Nov 2015 17:46:20 +0100 Subject: [PATCH] Fix VEVO --- src/video.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/video.cpp b/src/video.cpp index f7b3107..5a1dbd0 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -406,8 +406,12 @@ void Video::parseDashManifest(const QByteArray &bytes) { void Video::captureFunction(const QString &name, const QString &js) { QRegExp funcRe("function\\s+" + QRegExp::escape(name) + "\\s*\\([" + jsNameChars + ",\\s]*\\)\\s*\\{[^\\}]+\\}"); if (funcRe.indexIn(js) == -1) { - qWarning() << "Cannot capture function" << name; - return; + // try var foo = function(bar) { }; + funcRe = QRegExp("var\\s+" + QRegExp::escape(name) + "\\s*=\\s*function\\s*\\([" + jsNameChars + ",\\s]*\\)\\s*\\{[^\\}]+\\}"); + if (funcRe.indexIn(js) == -1) { + qWarning() << "Cannot capture function" << name; + return; + } } QString func = funcRe.cap(0); sigFunctions.insert(name, func); -- 2.39.5