Changeset 135 for smplayer/trunk/src/youtube/retrieveyoutubeurl.cpp
- Timestamp:
- Oct 24, 2012, 8:25:23 PM (13 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 133
- Property svn:mergeinfo changed
-
smplayer/trunk/src/youtube/retrieveyoutubeurl.cpp
r124 r135 27 27 28 28 preferred_quality = FLV_360p; 29 30 setUserAgent("Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)");31 29 } 32 30 … … 57 55 QRegExp regex("\\\"url_encoded_fmt_stream_map\\\"\\s*:\\s*\\\"([^\\\"]*)"); 58 56 regex.indexIn(replyString); 59 QString fmtArray = regex.cap(1); 57 QString fmtArray = regex.cap(1); 60 58 fmtArray = sanitizeForUnicodePoint(fmtArray); 61 59 fmtArray.replace(QRegExp("\\\\(.)"), "\\1"); … … 65 63 foreach(QString code, codeList) 66 64 { 67 code.remove(0, 4);68 65 QUrl url(code); 69 urlMap[url.queryItemValue("itag").toInt()] = code.remove(QRegExp("&itag=\\d+$")); 66 int itag = url.queryItemValue("itag").toInt(); 67 //qDebug("itag: %d", itag); 68 code.remove(QRegExp("itag=(\\d+)&url=")); 69 code.replace("&sig=", "&signature="); 70 urlMap[itag] = code; 71 //qDebug("code: '%s'", code.toUtf8().constData()); 70 72 } 71 73
Note:
See TracChangeset
for help on using the changeset viewer.