[英]javascript code bing search - get more than 30 results
I am doing a search over the bing search webpage. 我正在通过bing搜索网页进行搜索。 Assume I search for the term "Julia Roberts", then the url with the results is roughly the following one: 假设我搜索“ Julia Roberts”一词,则包含结果的网址大致如下:
http://www.bing.com/images/search?q=julia+roberts
As I am downloading the code using python, I use the following source: 当我使用python下载代码时,我使用以下资源:
import urllib
def geturl(link,my_file):
try:
urllib.request.urlretrieve(link, my_file)
except:
pass
link = "http://www.bing.com/images/search?q=julia+roberts"
my_file = "my_file.txt"
get_url(link,my_file)
The problem is, such source includes only the first 30 results (or 50). 问题在于,此类来源仅包含前30个结果(或50个)。
How do I get the source that includes, say, the 200 first results? 如何获得包括200个第一结果的来源?
I am not sure you expecting below result , please try in your console window for 我不确定您是否期望得到以下结果,请在控制台窗口中尝试
" http://www.bing.com/images/search?q=julia+roberts " for this page. 此页面的“ http://www.bing.com/images/search?q=julia+roberts ”。
JS: JS:
var a=document.querySelectorAll('div a img');
for(i in a){
console.log(a[i].src); // get all the image source src path
//console.count("called"); // it will retrieve 246 image src path
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.