I am writing a java code.
I want to search a string on google and google images using my java code.
Previously i wasnt even able to search text and then i had to register with google and then i could do it.
Now i want to search a string against googleimages
How can i do it?
Regards
Manjot
It's pretty similar to text search, you just need to specify the URL as
http://ajax.googleapis.com/ajax/services/search/images
Standard arguments are described here, image -specific ones are here.
I agree with ChssPly76, but you have to include version number in URL as following
http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=
put q= watever you want to search for.
I hope it will help you.
Cheers.
Related
How can i extract email id based on the website that i have got from Place Details using Google maps API.
I want to extract the generic email id from these place details or the website. I have attached a screen shot to show what i have. I am using open Refine.I am able to parse the phone number but can't parse email id's as its not present in these place details but i can see it on the website.
Thank you in advance.
This is the code i am using -
"https://maps.googleapis.com/maps/api/place/details/json?placeid=" + cells['PlaceID'].value + "&key=AIzaSyCSp-f-_FWHw8jfNFF9yd7mgUxaX-DZo8g"
According to the google maps places API this is not something that can be returned from the API. I believe that Google does not want its API to be used as a source for spamming companies. Based on that, I can't think of any legal option that would give you this email.
The only solution that I can think of would be to get the URL attribute from google maps API result and from then scrape the page and hope that there is a way to find the email address in the HTML code, but :
I don't think that google would present it in a easily scrappable way;
I believe it would go against terms of use of Google.
So to summarize I don't think there is an easy and legal solution to your question.
I have a string like this:
नमस्कार
Now i want to translate the string to html entity decoder. I can translate manually by using
url https://mothereff.in/html-entities
is there any java api to translate it ?
can anyone help me ? thanks in advance
This might prove to be useful unbescape. I found it to be diverse and very quick to implement. I'm using it to convert huge lists of strings with HTML entities in them back to normal strings. It's quick and accurate so far.
It seems, after a quick google search, that a popular solution to this is using StringEscapeUtils.unescapeHtml4(). More information can be found in this Stack Overflow question.
I found an example that suits me, but I can not understand how to change the search. There is a "spinner", it spelled out "types" of google maps dev, and the search goes only on them (that is, atm, bank, etc.), and I need to make so that the search was for "keywords" or "name". here is the link http://wptrafficanalyzer.in/blog/showing-nearby-places-and-place-details-using-google-places-api-and-google-maps-android-api-v2/ , please help. it is very necessary to solve the problem, I will be very grateful.
Your question is not very clear but I think you want to find out where to change the request for the Google API. So that's at this line:
StringBuilder sb = new StringBuilder("https://maps.googleapis.com/maps/api/place/details/json?");
sb.append("reference="+reference);
sb.append("&sensor=true");
sb.append("&key=YOUR_BROWSER_API_KEY_FOR_PLACES");
That's where he builds the URL for the request. Then have a look at the API Docs and you'll be able to find what you want
I need to get data from table id="maintable" from website "http://trackinn.az/GeoLoc/reports.aspx?login=ho&password=ho". I tried many methods some of them worked for other websites but not for this one. Could someone help pls?
Thanks.
You cannot get data from that table. It is being dynamically created by javascript (AJAX particularly). And I don't think there is any api wich can process javascript.
It would be possible to get data if it was a static file or the part you want would be static, but it is not.
If you are using this site to get geolocation, then use google geocoding api for this. it would be better option.
this is a follow-up question of mine.
Suppose now I have a URL :
http://www.baidu.com/s?bs=%B0%C2%B0%CD%C2%ED&f=8&wd=%B0%C2%B0%CD%C2%ED
and it work perfectly by inputting it in the text field of google translate and select from "Chinese" to English.
My question is ,suppose now I want to achieve this in Java,
I would like to adopt Process q=Runtime.getRuntime().exec("cmd /c start +URL")
approach to do this.
Could I achieve that by simply concatenating the Google translate URL and the webpage URL?
You can use HttpClient to perform you http requests.
You can use this api google-api-translate