Extract email id from place details that have website - java

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.

Related

Link URL data missing for some creatives in Facebook api

We opened issue about link url data that missing for some creative in facebook api , and we received answer that there are two ways to create an ad creative and the second one seems to have been created using an existing post ID, to get the link to the second ad we should call to {post_id}?fields=call_to_action .
Is there a way to get call_to_action data for multiple post IDS?
I have searched in the docs and didn't find way to do so ..
Is there a way to get call_to_action data for multiple post IDS?
?ids=post_id_1,post_id_2,...&fields=call_to_action
You can request data for up to 50 objects in one go this way.

Google Map searching using java code

Requirement:
1. jsp page contains a field that having a search button.
2. When I click on search, it should send a Http request and Response page should be of Google Map
3. That Google Map should zoom into particular Location, whatever I have typed in Search field.
Please tell me how to write, because I new to this.
And please tell me some tutorials where I can learn Completely about Java Code which is related to Google Map.

How to programmatically create and manage Google Forms via Google Document List API

We have a very specific need. We want to create a generic (Java based) registration system for Event organizers. So every Event organizer can define a custom form on our application, and then we collect the data from users for that particular event.
Now the input fields can change from Event to Event, so I was thinking to use some out-of-box cloud solution. One obvious thing came to my mind was to use Google Forms. So for every event, if we can programmatically create a Google Form and get following 2 things:
1) Embed link for that form
2) Access to corresponding data keeping Google Spreadsheet
We can use the embed link to show the Registration form to users on Event page. And we can access the Google Spreadsheet to access the data that Users have been filling in the Registration form.
But when I searched for it, I couldn't get a clear way to achieve this. There is some Google Documents List API, through which you can create Google documents programmatically, but I couldn't figure out, how to meet our needs through this API.
It would be of great help, if somebody can guide us in this regard. Or suggest us any alternate cloud solution.
UPDATE::
Looks like Google doesn't provides an API at all for Forms linked with Spreadsheets. http://goo.gl/ia8rk If we are lucky, they might include in their future releases.
So any other cloud based API that can be handy for this problem??
If I understand correctly, you have a Google sheet and you want a way to automatically generate a form. That generated form should link its responses back to that spreadsheet. Is that correct?
I don't know a way to do that with Java (if there is an available API for that, I don't think so) but that can be easily accomplished with Google Scripts. This was built in the script editor of a Google Spreadsheet.
Here is an example:
function onOpen() {
// read the docs to add to the toolbar
}
function getColumnHeaders() {
// this grabs the headers of your sheet
var headers = SpreadsheetApp
.getActiveSheet()
.getRange(1, 1, 1, SpreadsheetApp.getActiveSheet().getLastColumn())
.getValues()[0];
// this will appear in your root directory
var newForm = FormApp.create('NEW FORM NAME');
newForm.setDestination(FormApp.DestinationType.SPREADSHEET, SpreadsheetApp.getActiveSpreadsheet().getId());
headers.forEach(function(each) {
newForm.addTextItem().setTitle(each);
});
}
The documentation can be found here: https://developers.google.com/apps-script/reference/forms/

Get display name of document Author with Google Docs API?

I have to use Google Documents List API for an Android app until I have time to migrate to Drive API.
I want to get the First and Last name of the Author of a Document that is shared with me.
Currently I'm only able to get the username of the Author using the method below.
// entry is a DocumentListEntry
String aName = entry.getAuthors().get(0).getName();
Is there a property or method I'm missing? The documentation for the Java Docs API is sparse.
Nope. the docs here don't provide a lot of leeway on this. You might be able to try and tokenize the name, but there's no inherent guarantee a given name has to be made up of >1 part, and I wouldn't recommend that course of action.

Searching google images from java code

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.

Categories