Downloading data from Yahoo - yahoo

I have been downloading stock information from Yahoo using this method:
http://finance.yahoo.com/d/quotes.csv?s= (enter stocks here) &f= (add tags depending on what info I need)
This provides me with a csv file with the requested information.
What I want to do is download only the information that satisfies a certain requirement. For example I want to only download data on stocks that are worth more than $100 per share, or stocks that have lost %10 of value during a day.
Much appreciated if someone could tell me how to do this or even if there is a better method than what I am doing.
Thanks a lot

can you try to use the YQL console. See example below.
http://developer.yahoo.com/yql/console/?q=select%20%20from%20internet&env=store://datatables.org/alltableswithkeys#h=select++from+yahoo.finance.historicaldata+where+symbol+in+(%22MSFT%22)+and+startDate+%3D+%222012-09-13%22+and+endDate+%3D+%222012-09-16%22%0A
Further there you have other table you can use to receive information. See yahoo.finance Tables.

Related

Store Google Places "place_id" and refresh them

I've just spent a long time reading documentation about the Google API Places, and there's some information I don't quite understand.
I need to build an application that can record a travel plan for a user, so a sequence of places.
For this, I need a very simple form, with a "destination" input, which will use "Autocomplete Places".
This endpoint return a place_id for the selected location, which is the only thing I'm allowed to store in a database, according to Google's terms and conditions.
So in my idea, I'll store this id, and a itinerary would be made of a sequence of place_id, without the need to store the place name or anything else. To display the user's itinerary, I'd just have to make Place Details queries, with the identifier.
But the documentation specifies that these ids can change over time, so they advise to redo queries "periodically" to refresh the place_id.
But how can I redo queries if I haven't stored any information about the place, other than the place_id ? Do I need to store the name of the place (and do I have the right to do that?) to be able to retrieve its ID, or am I missing something?
Another thing: I didn't find, or didn't understand, in the terms of use, if I was allowed to store data generated by my site beside Google IDs, for example, to store comments about places.
Sorry if I make language mistakes, im not fluent in english.
Thanks !

Product Data Scraping Magento

The product uploading feature will be automated, so all you need to do is enter a product link through the back-end itself and that then add the product photo and description during the night preferably
Please let us know its possible in Magento
IMHO, the best way to achieve that is to create a csv uploader in the backend like you can find in Mage_ImportExport_Adminhtml_ImportController (the whole module can be source of inspiration). The csv feeds a special table that you create with during your module initialization. At the end, with a cron, at the desired time you check this table for the url and then retrieve the photo and description using curl or something similar.
Side considerations :
If you have a large amount of products to inject, you will prefer direct sql queries than the slow Magento ORM
Do not forget to deactivate the indexation during import process
If you need to update and references are different between your source and your Magento, create a special attribute to be sure to have a link between both
If you feel more confortable with other framework or language and you need to create a large amount of data, the importation process can be done with any language able to interact with mysql.

Consuming an API - methodology/process?

I have a supplier's product file which I've read into memory via CSV. My next step is to make updates and additions to an existing BigCommerce product list (9k products). This is the first time I'll be dealing with an API.
My supplier file doesn't have the BC product ID in it, only its own product ID which is a piece of data on the product in BC.
In terms of requests, I think I'd need to:
GET a chunk of BC products (I think it's 200 per request)
iterate over the BC products, using bc id and where it matches the supplier file, then do PUT's to deal with updates
keep getting chunks until done
any remaining products are then added via PUT's
I think HTTParty is an applicable gem (along with the big commerce Ruby one).
My question is does the above fit the 'normal' process of how you would attack a problem like this? Or is there a better/standard way of how this would be approached?
The main thing I'm concerned about is how to iterate given there are 9000 records and I don't know the id ahead of requesting all?
The above is pretty much how I ended up doing the updates.
Main issue was order of getting/putting data so that nested objects worked correctly.
Eg need to do brands and categories updates before you can add products using them. Products need to be added before you can do images or Options/Option Sets
My first version I've stuck with HTTParty, but the next refactor will use Typhoeus to get through the data quicker; but need to be mindful of BC's API limits which for this sort of process you'll run into pretty quick (eg 4k product updates).

RedSHOP - mod_products info needed

I'm terribly sorry to post this question here, but RedCOMPONENT just does not bother to answer my forum post or anyone else for that matter.
All I want to know, can this mod_products from RedCOMPONENT display featured products as well as products from a specific brand?
Thanks in advance.
You won't be able to do it with the extension you mentioned unless you code it yourself. I haven't looked into redSHOP majorly before and I;m not going to pay to download the module you mentioned, but in one of the PHP files, there will be some code retrieving the products from a specific table column using an SQL command. You could always try adapting this so that (if features products have their own table column) the SQL command retrieve products from both columns.
Else, you might be interested in this module which shows the features products for RedSHOP.
http://extensions.joomla.org/extensions/extension-specific/redshop-extensions/13964
You should use mod_redshop_featureproduct module.

Any IMDB API to get user's ratings history?

I need to be able to import IMDB user's movie ratings into my website. Is there any API for this purpose?
The short answer is that there is not an API for this purpose (at the moment).
If you need to get a user's movie ratings I think that the best solution for you is to log in at IMDB, go inside the user profile page, click on rating and in the bottom of the page click on the CSV export.
This should contains all the data you are looking for and in a good format. The bad news is that you have to follow these steps for each user you want to get the ratings. There is not an automatic procedure to get them.

Resources