简体   繁体   中英

Java Return a List of Google URL Results without Custom Search API?

I need to be able to get thousands of results a day, and the Custom Search API only allows 100. Is there any way to remove this limit or get results without the use of their API? Thanks!

For anyone that needs to know this (I got it now!):

Get the source using the JSoup library:

Document document = Jsoup
    .connect("http://www.google.com/search?q=" + query)
    .userAgent("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0")     
    .get();

System.out.println(document.html());

Then you can parse the URLs from inside the A (href) tags! Voila!

Get search result of google in java 在Java中获取Google的搜索结果

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM