Matlab:web(url)和webread(url)显示不同的结果

时间:2016-12-14 10:24:18

标签: html matlab url

谁能帮帮我?我想在Matlab中使用Google进行自动图像搜索,并希望将结果保存在文件中。我使用(例如)此URL:

url = http://images.google.com/searchbyimage?image_url=http://www.vidiani.com/maps/maps_of_europe/maps_of_germany/detailed_administrative_and_road_map_of_germany.jpg

如果我使用网址(网址):浏览器会打开所请求的网站 - 完美!

但如果我使用 webread(网址):我会收到一个显示Google网页的HTML代码但没有搜索结果(请参阅下面的html)。我能做些什么来获得与web(url)相同的结果?

<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="en"><head><meta content="Google Images. The most comprehensive image search on the web." name="description"><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><title>Google Images</title><script>(function(){window.google={kEI:'ARtRWJu3ItCTa82BqKgB',kEXPI:'750722,1351903,3700278,4028875,4029815,4032677,4038012,4043492,4045841,4048347,4063220,4065787,4068550,4069772,4069839,4069840,4070137,4071842,4072602,4072774,4073405,4073728,4073959,4076095,4076930,4076939,4076999,4077776,4078438,4078457,4079105,4079894,4080167,4080466,4081037,4081039,4081425,4081486,4082217,4082619,4083476,4084298,4084341,4084956,4085180,4085477,4086011,4086292,4086708,4086874,4087192,4087718,4088153,4088217,4088526,4088597,4089003,4089106,4089183,4089338,4089481,4089527,4089538,4089741,4089752,4090086,4090090,4090093,4090105,4090181,4090372,4090433,4090539,4090806,4090893,4090927,8300095,8300272,8300478,8504110,8506615,8507099,8507380,8507419,8507899,8508059,8508065,8508119,8508590,8508956,8509066,8509226,8509243,10200083,10200096,13500022',authuser:0,kscs:'c9c918f0_24'};google.kHL='en';})();(function(){google.lc=[];google.li=0;google.getEI=function(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||google.kEI};google.getLEI=function(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute("leid")));)a=a.parentNode;return b};google.https=function(){return"https:"==window.location.protocol};google.ml=function(){return null};google.wl=function(a,b){try{google.ml(Error(a),!1,b)}catch(c){}};google.time=function(){return(new Date).getTime()};google.log=function(a,b,c,d,g){a=google.logUrl(a,b,c,d,g);if(""!=a){b=new Image;var e=google.lc,f=google.li;e[f]=b;b.onerror=b.onload=b.onabort=function(){delete e[f]};window.google&&window.google.vel&&window.google.vel.lu&&window.google.vel.lu(a);b.src=a;google.li=f+1}};google.logUrl=function(a,b,c,d,g){var e="",f=google.ls||"";c||-1!=b.search("&ei=")||(e="&ei="+google.getEI(d),-1==b.search("&lei=")&&(d=google.getLEI(d))&&(e+="&lei="+d));a=c||"/"+(g||"gen_204")+"?atyp=i&ct="+a+"&cad="+b+e+f+"&zx="+google.time();/^http:/i.test(a)&&google.https()&&(google.ml(Error("a"),!1,{src:a,glmm:1}),a="");return a};google.y={};google.x=function(a,b){google.y[a.id]=[a,b];return!1};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};}).call(this);</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}
</style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#36c}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}a.gb1,a.gb2,a.gb3,a.gb4{color:#11c !important}body{background:#fff;color:black}a{color:#11c;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#36c}a:visited{color:#551a8b}a.gb1,a.gb4{text-decoration:underline}a.gb3:hover{text-decoration:none}#ghead a.gb2:hover{color:#fff !important}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}.lsbb{background:#eee;border:solid 1px;border-color:#ccc #999 #999 #ccc;height:30px}.lsbb{display:block}.ftl,#fll a{display:inline-block;margin:0 12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}.lsb:active{background:#ccc}.lst:focus{outline:none}.prms{color:#c00;font-size:13px}.sshppd{font-size:13px;margin:32px 0 26px}.sshpplo span{color:#c00}.sshpplt{margin:15px 0 30px}</style><script></script><link href="/images/branding/product/ico/googleg_lodp.ico" rel="shortcut icon"></head><body bgcolor="#fff"><script>(function(){var src='/images/nav_logo229.png';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}
if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}
}
})();</script><div id="mngb"> <div id=gbar><nobr><a class=gb1 href="https://www.google.com/webhp?tab=iw">Search</a> <b class=gb1>Images</b> <a class=gb1 href="http://maps.google.com/maps?hl=en&tab=il">Maps</a> <a class=gb1 href="https://play.google.com/?hl=en&tab=i8">Play</a> <a class=gb1 href="http://www.youtube.com/?tab=i1">YouTube</a> <a class=gb1 href="http://news.google.com/nwshp?hl=en&tab=in">News</a> <a class=gb1 href="https://mail.google.com/mail/?tab=im">Gmail</a> <a class=gb1 href="https://drive.google.com/?tab=io">Drive</a> <a class=gb1 style="text-decoration:none" href="https://www.google.com/intl/en/options/"><u>More</u> &raquo;</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span>Web History | Settings | <a target=_top id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=en&passive=true&continue=http://images.google.com/imghp%3Ftbs%3Dsbi:AMhZZiuQzcp13DlCikbtS-12MMnsRbtztQ06WGH7hNo5CKEbe4e1KJN4eTTGS2nWLQ8oedOliwyvmDokdutYS2edIWJ12aUhqeOGCEzJBK_1vCd1zZEHpgM4BlAyaINTdx5pU3E3Wdr2XK4uOU2kJPxO4TSElym9HL99ixmRW4pk6ICfnTEFeFZvgyOYXoRVuIjWSam46bm-HGiULlfNJ0oU7djQYsoEu_18vkEu2S3o5i2uAhMLG5BFY7PJK8izcnAq3pjtgrECRR1B3UsXLdsdlZfE8Gh5q28_1ceBjjOvboyNsC127v4bF-Yu7hHR07Xe00V2qc37YrC_1xf58_1bWG6ui2FLAr7F9_1GBhEt-Od5v2zyaAhBzpWZBtTIUtDuVeHeTLd7JAQgBB3dfdncBNd_148z3yMKkfI6PwVftUm9AiyN6Nruer7Ei2R4C3XTkqwkJu5vblgsuERVHkBBcv9Cg-KaDRvD4XOHTKPdqKSZ1_1QJ3cStWh67m3VIXx9y55Vgt2s5hGrP0X5BrkEEfONE6nr4w55cMzvbHXKwYo7vbqfImwIwIx4vXr8QwLYIFc8rytiD6pSvt3u0P5M-8HYBL6f34CvjrDJwWO_1BGa0e9ZUGHYEsMR6rFnBAoyutgdwW0lqVvzC9P_13BEblipMC89aYZyNQsS-SIF74o4bpSDsBgMdvY86NBknuD1H8ud5nY-lseE5XGiViDAjH1whxJdoDiJ1EAfHhuzwn4mrMuZA_1-AwlTKR_1Cs8RNc6b1f39SMyMEa6_1SaHCjnckMVhdkN0gvsZp6hYo1j-JjsovZ53JGU_1q0d1HZy-RAGAMvqTb2Vpgc8E8dGXuzmc9tmiT4YOHa2e2pxlcf_10CKFX1tELwTUjDwiTnbWJyXGy5UTXpc9oEbGGiUiPTtoLdL4UMMqVEgkL1N5OPN0OhDHM-GRe9EKBsWlvNTy97MuruKZTWOwFOYBnIW73s-JddupGqFbbjGGiffrrxUWkxib-teIxLfO-aIjJ4ESjLgrrfATCQZGjPf1_17lJe0V69vk2TPQcD9z9iYhFMfBAU7eyyS2ycG68EBz3cGQUUeOE9t1KAan6Igm1svmysT7Dpxw9QwSG72uowynKdk3rskSs1SgLn0riC1Exj1k1QM9F9GgBre6egnvKH3hFJiKnAVWU1yo0WswCulbT6dxx0MlgPlG3n7S8qTm2Bm-tazLKP0sabMWONqbC7UwdZjpUh1PQdaGnU5REkXqDiokew6-3ptpY0ydzqliUX2PJFABidJRoJVIKZaAlMVvsdcrIJg4e_1AbQ8h4_10hJZ8FUfYacDubmopUtHCFNJAm_1xgP9T_1asnPejz6rCesdLj3MuQMGoPngmxGKoegfGq8j_16YWhiK-zZBOt-c57diSC-5VHfbHbtZt4hIly1Cwm1tx8JpJWGd3eZGsHW9g_1EAjIj3EHTI7oDU68m1NdbDuB8YGdRPrSC841lGKaYXtfEpD61iFy9z5texWnSxcFi_13ZQ9AsGUpT8iulAeUJnWrxKwSSSed5HzRVFhIvAbMsAhIZYlfG2IHzjM0JbaVxpo5iObcnaEIQyLP9KlyUOxVtemN5-tv9TUfba3nQt5zfEEv_12g7Y92vuC3hzGUHJKWCYp3KvP16btKXTW8LDlIp6HeAp1va8T18A_1Li8xMyEfQ5rC0ZOClSyYquFC4rK6OyjLYSO5KnT0dbvfF0F0eD1GAG-wyekKdAUp915r5zKsPNsjgbfXkWOtxSadLVTSI_1Oeh4rDWOXqg4Oizg_1vQfOQ4yBkQn5I7kQyK1FhfCXaP9" class=gb4>Sign in</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div> </div><center><br clear="all" id="lgpd"><div id="lga"><div style="padding:28px 0 3px"><div style="height:110px;width:276px;background:url(/intl/en_ALL/images/branding/googlelogo/1x/googlelogo_white_background_color_272x92dp.png) no-repeat" title="Google Images" align="left" id="hplogo" onload="window.lol&&lol()"><div nowrap="" style="color:#1370E5;font-size:16px;font-weight:bold;position:relative;top:70px;right:115px;float:right"><span>Images</span></div></div></div><br></div><form action="/search" name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td width="25%">&nbsp;</td><td align="center" nowrap=""><input name="tbm" value="isch" type="hidden"><input name="ie" value="ISO-8859-1" type="hidden"><input value="en" name="hl" type="hidden"><input name="source" type="hidden" value="hp"><input name="biw" type="hidden"><input name="bih" type="hidden"><div class="ds" style="height:32px;margin:4px 0"><input style="color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top" autocomplete="off" class="lst" value="" title="Search Images" maxlength="2048" name="q" size="57"></div> <span class="ds"><span class="lsbb"><input class="lsb" value="Search Images" name="btnG" type="submit"></span></span></td><td class="fl sblc" align="left" valign="middle" nowrap="" width="25%">Advanced&nbsp;Image&nbsp;Search</td></tr></table><input id="gbv" name="gbv" type="hidden" value="1"></form><div id="gac_scont"></div><div style="font-size:83%;min-height:3.5em"><br></div><span id="footer"><div style="font-size:10pt"><div style="margin:19px auto;text-align:center" id="fll">Advertising ProgramsBusiness Solutions+GoogleAbout Google</div></div><p style="color:#767676;font-size:8pt">&copy; 2016 - Privacy - Terms</p></span></center><script>(function(){window.google.cdo={height:0,width:0};(function(){var a=window.innerWidth,b=window.innerHeight;if(!a||!b)var c=window.document,d="CSS1Compat"==c.compatMode?c.documentElement:c.body,a=d.clientWidth,b=d.clientHeight;a&&b&&(a!=google.cdo.width||b!=google.cdo.height)&&google.log("","","/client_204?&atyp=i&biw="+a+"&bih="+b+"&ei="+google.kEI);}).call(this);})();</script><div id="xjsd"></div><div id="xjsi"><script>(function(){function c(b){window.setTimeout(function(){var a=document.createElement("script");a.src=b;document.getElementById("xjsd").appendChild(a)},0)}google.dljp=function(b,a){google.xjsu=b;c(a)};google.dlj=c;}).call(this);(function(){window.google.xjsrm=[];})();if(google.y)google.y.first=[];if(!google.xjs){window._=window._||{};window._._DumpException=function(e){throw e};if(google.timers&&google.timers.load.t){google.timers.load.t.xjsls=new Date().getTime();}google.dljp('/xjs/_/js/k\x3dxjs.hp.en_US.WN3XpSz-BG8.O/m\x3dsb_he,d/rt\x3dj/d\x3d1/t\x3dzcms/rs\x3dACT90oGvdHa7TL2W_IQX1s5BPxYIHeUvhQ','/xjs/_/js/k\x3dxjs.hp.en_US.WN3XpSz-BG8.O/m\x3dsb_he,d/rt\x3dj/d\x3d1/t\x3dzcms/rs\x3dACT90oGvdHa7TL2W_IQX1s5BPxYIHeUvhQ');google.xjs=1;}google.pmc={"sb_he":{"agen":true,"cgen":true,"client":"img","dh":true,"dhqt":true,"ds":"i","host":"google.com","isbh":28,"jam":0,"jsonp":true,"msgs":{"cibl":"Clear Search","dym":"Did you mean:","lcky":"I\u0026#39;m Feeling Lucky","lml":"Learn more","oskt":"Input tools","psrc":"This search was removed from your \u003Ca href=\"/history\"\u003EWeb History\u003C/a\u003E","psrl":"Remove","sbit":"Search by image","srch":"Google Search"},"nds":true,"ovr":{},"pq":"","scd":10,"sce":5,"stok":"SpaXy5a_D5tZr4lQOKtnJpgvzVc"},"d":{}};google.y.first.push(function(){if(google.med){google.med('init');google.initHistory();google.med('history');}});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);}
</script></div></body></html>

1 个答案:

答案 0 :(得分:0)

Web和webread功能是用于特定目的的不同Web功能。如您所述,Web功能在浏览器中打开网页或文件,webread从Web服务中读取内容。