# HG changeset patch # User Matti Hamalainen # Date 1318526053 -10800 # Node ID e5f2961a6145fc9880c208a3ad02930c7382bfa8 # Parent d40a0f3af7ab019539745c6867ba3773e76f0a48 urllog: Improve rasiatube URL de-mangling. diff -r d40a0f3af7ab -r e5f2961a6145 urllog.tcl --- a/urllog.tcl Thu Oct 13 20:13:31 2011 +0300 +++ b/urllog.tcl Thu Oct 13 20:14:13 2011 +0300 @@ -547,16 +547,12 @@ # Rasiatube hack if {[string match "*/rasiatube/view*" $urlStr]} { set rasia 0 - set umatches [regexp -nocase -inline -- " 0} { - set urlStr [lindex $umatches 1] - regsub -all "\/v\/" $urlStr "\/watch\?v=" urlStr + if {[regexp -nocase -- " 0} { - set urlStr [lindex $umatches 1] - regsub "http:\/\/www.dailymotion.com\/swf\/" $urlStr "http:\/\/www.dailymotion.com\/video\/" urlStr + if {[regexp -nocase -- "SWFObject.\"(\[^\"\]+)\", *\"flashvideo" $udata umatches utmp]} { + regsub "http:\/\/www.dailymotion.com\/swf\/" $utmp "http:\/\/www.dailymotion.com\/video\/" urlStr set rasia 1 } }