File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ - (IBAction)download {
80
80
if (userInterfaceIdiom == UIUserInterfaceIdiomPhone) {
81
81
getURL = [webView stringByEvaluatingJavaScriptFromString: @" function getURL() {var player = document.getElementById('player'); var video = player.getElementsByTagName('video')[0]; return video.getAttribute('src');} getURL();" ];
82
82
} else {
83
- getURL = [webView stringByEvaluatingJavaScriptFromString: @" function getURL() {var bh = document.getElementsByClassName('bh')[0]; return bh .getAttribute('src');} getURL();" ];
83
+ getURL = [webView stringByEvaluatingJavaScriptFromString: @" function getURL() {var bh = document.getElementsByClassName('bh'); if (bh.length) {return bh [0].getAttribute('src');} else {var zq = document.getElementsByClassName('zq')[0]; return zq .getAttribute('src');} } getURL();" ];
84
84
}
85
85
86
86
NSString *getTitle = [webView stringByEvaluatingJavaScriptFromString: @" function getTitle() {var jm = document.getElementsByClassName('jm'); if (jm.length) {return jm[0].innerHTML;} else {var lp = document.getElementsByClassName('lp')[0]; return lp.childNodes[0].innerHTML;}} getTitle();" ];
You can’t perform that action at this time.
0 commit comments