Applescript scraping webpage - applescript

there is this awesome website called www.engrade.com. You can get your grades from the website when you log in from your various classes.
Now, is it possible for an Applescript to parse engrade.com, log in as me, using my username and password, then parse to find my grade?
can some one show an example of this? especially logging in.
Thanks,
Elijah

I'd suggest a language like Python to do this. Why do you want to do it with Applescript?

Related

Getting data (text, ...) what user says

Is it possible to get the text of what a user says to Google home ? I couldn't find any way how to do that.
I have an API that can process language as a text. If that's not possible, is it possible to get what users says. I could then use speech recognition to get the text.
Thank you
It looks like you can use the RawInputs portion of the conversation API.
https://developers.google.com/actions/reference/v1/conversation#RawInputs

having chrome extensions pulling data from ruby db

I would like to build a chrome extension (CE) that pulls data from a ruby db for a specific user. So, in a basic example, if an user submits their favorite color as 'red' and sport as 'tennis' into the db from the core website, when they click the CE, 'red' and 'tennis' will show up no matter where they are on the internet.
Any guidance on how to build something like this? Seems quite simple but am not sure how the CE files fit in with the ruby folder framework.
Also, is it possible to write to a ruby database from a popped out CE? i.e. - submitting 'red' and 'tennis' from the CE to the ruby database to go along with the previous example. Any guidance?
Cheers
This is a very general question so it sounds like you will need to learn a lot. Which can be a good thing :)
Here are the general steps you need:
Look into building an API for your ruby application. This will allow you to get data from your database. For example, you can
make an app where you go to http://yoursite.com/api/favorites and that will return a list of all favorites as JSON. Then in your Chrome Extension you can parse the JSON and display the results to the user. You will probably want to do this using an ajax call (see jquery.ajax for an easy way to use ajax).
Assuming you want user accounts, your user will need to be logged in. Then you can use your user's cookies to verify that they are logged in and show them custom info. i.e. going to http://yoursite.com/api/favorites will just show the favorites for that user, not for everyone.
Finally, submitting things to the database...you can have another route where users can send stuff. For example, if you go to http://yoursite.com/api/favorites/add?color=red then it will add the color red to that user's favorites. You will need to write all the logic for adding stuff to the database...again, it might help you to go through a rails tutorial and then look at building an API.
Related to #3, look into RESTful APIs. A good convention is that if you issue a GET request, you're asking for data, but if you issue a POST request, you are adding data (in your case, creating a new favorite).
Finally, for terminology: it's not a "ruby" database, it's just a database. You can access a database using almost any language, and it sounds like you are accessing it using ruby right now :)
If you only need to store data for one machine browsing anywhere online, chrome has a storage api that would work great.
If you do need a ruby server, I would recommend looking at sinatra.

want to know DATE FORMAT of Yammer API for passing query parameter as date in URL

I found these links on this site itself..
GET https://www.yammer.com/api/v1/users/{USER_ID}/modified_before/{DATETIME}.json?access_token={ACCESS_TOKEN}
GET https://www.yammer.com/api/v1/subscriptions/created_after/{DATETIME}.json?access_token={ACCESS_TOKEN}
I want to know which date format do i need to use to run my URL properly.
Any kind of help is appreciated
I can't find an example of the requests you've listed. The only example I've found online was someone asking if it was possible to do that with the Yammer API, and the answer appears to be no.
Take a look at the Yammer Ruby gem for example, there is no option as you've described: https://github.com/yammer/yam/blob/master/lib/yammer/api/user.rb
So it's not a matter of having the right timestamp format, it's that the API doesn't support what you're trying to do.

MVC3 C# Beginner in Twitterizer: How to logOn user via Twitter and get some user information?

I downloaded Twitterizer, read documentation, downloaded the samples but as I'm working with MVC3, I'm a little bit lost about how to write the code. Could someone guide me posting code samples on how to logIn an user in my system using Twitter and get some information as full name, birthdate, etc?
Here is an example application following the video you posted, but using Twitterizer.
http://www.twitterizer.net/files/twitterizer-mvc3-login-example.zip
I just move to TweetSharp, much easier to understand if you are beginner with OAuth. This video tutorial saved my day http://www.youtube.com/watch?v=A6AVn-E3TwY

Ruby access/submit queries on websites

Say I wanted to create a ruby script that would access google, search for 'dogs', and then return the links of the top 5 results. How would this be implemented in ruby?
Thanks.
To clarify, I'm not looking for a way to search Google specifically. I want this to work on other sites too, such as amazon.com, dictionary.com, etc.
See the answer to this question: Using Google Search REST API in Ruby
You could hack through it with hpricot, if a google api doesn't exist already. Or here is a script
I would use cURL to actually GET the page contents (its a simple GET request to google.com/?q=stuff). Then you'll need to use regular expressions and intuition to parse the DOM, extract the links, and display :)

Resources