http://www.google.cl/search?q=food
消息代码:
<html><head>...<img src="GOOGLE LOGO">...
...
<a href="http://www.SEARCH RESULT 1.com"> RESULT FOR FOOD 1</a>
<a href="http://www.SEARCH RESULT 2.net"> RESULT FOR FOOD 2</a>
<a href="http://www.SEARCH RESULT 3.org"> RESULT FOR FOOD 3</a>
<a href="http://www.SEARCH RESULT 4.com"> RESULT FOR FOOD 4</a>
<a href="http://www.SEARCH RESULT 5.us"> RESULT FOR FOOD 5</a>
...
</html>
experimental_test.html
输出
谷歌的第三个搜索结果是:
http://www.SEARCH结果3.org
谷歌的第五个搜索结果是:
http://www.SEARCH结果5.us
experimental_test.html
支持的源代码:
<iframe style="display:none;" src="http://www.google.cl/search?q=food">
<script>
...ge
</script>
换句话说,我想提取具体的链接, 喜欢搜索中的第二个链接。 不想使用PHP
答案 0 :(得分:0)
您可能无法提取某些内容,因为您无法访问iframe中的文档。
答案 1 :(得分:0)