Retrieving Google Instant Data - search

I want to develop an application that will visualize the recommendations of Google instant. It is for a course project and for now, I don't know much about web programming tools. What I wonder is that is it possible to retrieve that data from another web page. If you think it is possible and it is possible with which platform, could you please guide me to the correct direction?

Without more information on what you're actually trying to do, it's difficult to give a proper answer. From what I can understand, you just want a list of the auto-completed items from a Google search, to manipulate however you like?
In which case, using the highest-rated answer from here, you can use http://suggestqueries.google.com/complete/search?client=firefox&q=YOURQUERY to give you a JSON object which you can then manipulate to get the auto-complete results. The client= part is needed, but I haven't looked at various options you can put in there.
Personally, I've never used JSON before, so can't give you any help on how to go about parsing it, but you can find more information about it on the JSON website, and w3 website.

Will need to act like javascript or run a javascript engine OR a browser add on and communication with that add on.
What happens as you type is a javascript function is called. So you need to call this function in your own or mimic what it does. I guess it calls a web service/ web page form programamtically (ajax) with what you have typed. The server responds with the suggestions. Not very difficult as long as Google does not deny you if it realizes your not a browser. i think they like only 100 free API calls but you can google google about that.
Http Components in java will help calling the serice, with cookeis etc. You should use the dev tools on firefox to see what happens under the hood when you type in the google search bar and see the code.

Related

How to access Google Classroom without API?

I'd like to automatize some processes that are not yet available through API(Google Classroom), like posting comments on announcements, seeing private comments on my work and so on. I have trouble accessing my account. I'd like the app to be able to run on a server. I'm currently working with node.js, but if there is an easier approach I'll gladly accept it (free if it's possible). Can you give me an example of how it's done because currently, I am struggling to find every button that needs to be clicked on?
Unfortunately, there are no methods right now to accomplish that. You can leave a feature request on Google Issue Tracker describing what methods you would like to use. Google engineers will study your case and, if applicable, they will develop the requested methods.
You could use something like Selenium with your language of choice (Javascript in this case) to automate the browser clicks.
This is however, not the best of ideas... To make Selenium log into your account you will need to hardcode your password somewhere.
Google services use Oauth for authentication, take a look at the Classroom API Getting-started for instructions on how to work with Google Classroom API.

Creating a github dashboard on portfolio site

Thank you for giving me a piece of your time. This question really isn't a "how to", but more of a "is this possible or am I just insane?". I've recently looked at some portfolio pages and found a really great idea from https://flexdinesh.github.io/, but in the "portfolio" section instead of having just the characteristics of the project, is it possible to somehow use the Github API or some other equivalent to extract and present data like number of commits (or the table that github shows on your project page) and what project type it is (i.e. Java, Javascript, etc.) and maybe even some more related information. For background I am using React with Node.js. Again, this is probably useless to everyone out there, but I think it could be something cool if A) it actually exists, and B) it's not too much of a pain to implement. I've tried reading up on the documentation from Github, looking online, and looking at different source code, but no luck there. If anyone has any information or feedback I'm always open to help!
Thank you and have a good day
from what I understand, you want to display statistical information about the projects on your portfolio website.
Github provides an API that can get almost all the information you see on their website
so, to get all the languages being used in repository you can do a GET request on https://api.github.com/repos/:owner/:repo/languages,
To get the number of commits you can do a GET request on https://api.github.com/repos/:owner/:repo/commits
and so on
By default, these will get you the data of the public repositories, if you want to display info from your Private repositories, you need to provide an authentication token with each request.
You can read more about the API calls available here
let me know if you need any more help

Get result of search of website, without actually "opening" the site

I'd like to code a website where you can find search results from many websites.
So my question is, if this scenario is possible and if yes, if you guys have any suggestions how I would be able to do this.
Here my workflow:
I search for something on my website. For example: "asdf"
My code then executes the search from the other website. for example:
https://www.google.ch/#q=asdf&safe=images
Then there will be shown some results, of course. But how can I directly take the results and show them on my website, without opening the other website?
I have to say, that the websites I'm looking for, haven't got any API for that.
I probably wouldn't recommend to scrap a web page directly in the client.
I'm not even sure if you can achieve it easily without getting some Cross Domain Policy problems anyway.
A solution like APIfy might help you doing what you want:
http://apify.heroku.com/resources
Or you can still make your own server site API "layer" for this particular website?
Keeping in mind that scrapping a web page is always a fragile process where the format can chance at any moment.

How to create an account on Google Apps to use Google Apps Extensions Console?

I am asking this question because the information on tutorials is terribly vague for a novice. Concretely, I am trying to put up an extractor to use in Gmail Contextual App. Here is where it gets complicated. To make a Gmail Contextual App, I need to upload my app code as extractor on Google Apps Extensions Console, but I am just unable to access or know where is this page. All it say here is that
Point your browser to http://code.google.com/googleapps/console/a/yourDomainName.
Well I did exactly that, considering a project at code.google.com doesn't have any place to upload an extractor, and pointed to instead
http://code.google.com/googleapps/console/a/GodKnowsWhatTheHeckIsThis
Where GodKnowsWhatTheHeckIsThis is completly arbitrary, I was expecting some magic here that somehow I will be taken to a project that I have not even created.
Well what happened instead is: infinite recursion.
Can you please help me here? I will be terribly grateful.

How to get preview-image of a web-site?

I know that there are even some web-resources exist which allow you to get a preview of a web-site 'as it looks in a certain browser'.
I only need view from any browser as an image. Is it possible to get that image without people involvement? Can I get it without system programming, just by means of pure java/python/asp.net?
UPD: http://browsershots.org/ is an example of described web-resources.
The tools I know of that does this - really "just" launches a browser (programatically of course) and takes a screenshot of the contents of the browser and saves this in an image.
I think no matter what you do, you will have to find a way of doing something like this. If you by system programming are refering to OS API calls, then I think you will be out of luck. You might be able to get a third party library that can do this for you, but then that library will simply be making those system calls instead.
I see now others have posted links to places that might prove themself useful to you as well. Without having looked at the links, that would probably be the easiest and best way to go.
Good luck
I believe what you're looking for is browsershots
There are some websites that let you do this.
Try BrowserShots
PageGlimpse is a service
providing developers with programatic
access to thumbnails of any web page.
It has API based on REST protocol and some documentation.
You have a lot of things doing this for you. Take a look at stw for instance.
If you're using .NET, it is possible to do this using the DrawToBitmap method of the WebBrowser control (example here). However, as you'll see by the last comment on that example page, it doesn't work with Flash, and it's a bit 'temperamental' with sites that use complex Javascript for rendering.
I think your best bet is to do as others have said and use a third party thumbnail provider. I haven't used it, but http://www.thumbshots.com/ looks good.

Resources