question

M. Cortopassi avatar image
M. Cortopassi asked

Python vs. node.js / screen scraping

Hi, New to Alexa. Background, long time ago is in Visual Basic, and minimal VB scripting. I understand the environment and generally how to get things working. I want my first skill to simply allow me to say "Alexa, what is the current price of gold?" and have her say back what it is. I know little of hooking into APIs to get the price of gold, and regardless, most need paid subscriptions. So my plan was to simply scrape the price from Apmex.com, which I do already in a Google spreadsheet. Any comments/code snippets for scraping data from a website are appreciated! Also, any comments on whether I would be better off using Python or node.js for programming are appreciated. Since I am new to both, I am open to either. Thanks, Mike
alexa skills kitdebugging
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jjaquinta avatar image
jjaquinta answered
First off, screen scaping is a hack. Don't release a professional skill that uses that. If you just want to mess around... it's up to you. Secondly, that phrase won't work. Read the doc. 3rd party skills have to be invoked with specific language. E.g. if you call your skill "gold price" then you can say "Alexa, ask Gold Price for current value"
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mpassi avatar image
mpassi answered
I understand the parsing now, thanks. But as to the screen scraping, when the only other option are paid APIs to get the price vs. scraping from a screen, it's a difficult proposition. I'd rather call an API, but for commodity prices, seems everything generally requires a subscription, or otherwise the data is a day old.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.