目标URL:http://redirect.simba.taobao.com/rd?f=http%3A%2F%2Fs.click.taobao.com%2Ft%3Fe%3Dm%253D2%2526s%253D185nS4dlL%252BYcQipKwQzePOeEDrYVVa64REOHN%252B0iJT1RAdhuF14FMU56PYxJLOT0lovu%252FCElQOu0nqI%252FCoXmipaemZAtXiLu%252Ba%252BOVoNO%252B4FtWkRTd6%252FP10MaYBiEABUYH3ui7mSZ03Kj5M2AmFK%252FdPiLqets6lIJ&pvid=200_10.103.34.54_11162_1429367077145&b=aitaobao_content_1&k=7ca9e08409870ccd&p=mm_10144480_0_0&w=aitaobao_styledetail
这里淘宝客商品的链接,它是先会302或者301定向到另外一个页面,然后再通过JS模拟人工点击的方式进入淘宝商品页面,它的人工模拟点击页面代码如下:
[HTML] 纯文本查看 复制代码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<script type='text/javascript'>
function htmlspecialchars(str){
str = str.replace(/</g, '<');
str = str.replace(/>/g, '>');
str = str.replace(/"/g, '"');
str = str.replace(/'/g, ''');
return str;
}
function bol(){
if (top.location != self.location) {
return false;
}
var qs = location.search.split("?")[location.search.split("?").length-1].split("&");
qso = {};
for (var i=0; i<qs.length; i++){
if (qs[i]!="") {
var tmpa = qs[i].split("=");
qso[tmpa[0]] = tmpa[1] ? tmpa[1] : "";
}
}
var tu = unescape(qso.tu);
if (htmlspecialchars(tu).length != tu.length) {
exit;
}
if (qso.tu && (qso.tu.indexOf("http%3A%2F%2Fs.click.taobao.com%2F")===0
|| qso.tu.indexOf("http%3A%2F%2Fi.click.taobao.com%2F")===0
|| qso.tu.indexOf("http%3A%2F%2Fs.click.alimama.com%2F")===0
|| qso.tu.indexOf("http%3A%2F%2Fitem8.taobao.com%2F")===0
|| qso.tu.indexOf("http%3A%2F%2Fshop8.taobao.com%2F")===0)) {
if (!window.attachEvent) {
document.write('<input style="display:none" type="button" id="exe" value="">');
document.getElementById('exe').click();
} else {
document.write('<a style="display:none" href="'+unescape(qso.tu)+'" id="exe"></a>');
document.getElementById('exe').click();
}
}
}//end of bol()
bol();
</script>
</body>
</html>
可在这个页面找不到要跳转到的下一个URL,但是用浏览器打开它的时候却又可以跳转,C#能不能在进入这个页面后,运行页面里的JS代码,然后获取到下一个URL地址?
|