Interacting with Website input and output


#1

I wonder how a Mycroft skill can be designed to interact with a text or html based website like gurufocus.com . For example, I like adjusting the growth rate of the valuation estimator there to return an estimated fair value for a stock. https://www.gurufocus.com/fair_value_dcf.php?symbol=IBM and, I’d like to be able to say: “Mycroft, what is the fair value of IBM if we use a 9% growth rate.”


#2

example: https://github.com/praxeo/mycroft_spaceflightnow_skill

webscrapping intro: https://automatetheboringstuff.com/chapter11/

depending on the website you can use any standard python approach, request or beautifull soup should be enough, make sure the website does not have an api you can use instead

if you need selenium, well, it sucks to have many skills launching a browser so i made a shared browser skill https://jarbasai.github.io//skills/browser


#3

use requests to get the page and parse it.

Look at Jarbas example, or my numberskill, it also parses a webpage.