Read the statement by Michael Teeuw here.
module that displays a certain text from a website, the text on the website is updated daily
-
@Amoniak look thru the 3rd party.list. not up to date by a mile, but maybe
https://github.com/MichMich/MagicMirror/wiki/3rd-party-modules
-
I think I’ve found a similar module (MMM-PoemOfTheDay), but I don’t know how to adapt it to my needs, can someone help me?
Thanks :) -
@Amoniak MMM-PoemOfTheDay is perfect to adapt for your need. Instead of poem site you need to get data from WatchTower site and parse the html response to extract the text.
-
@ashishtank said in module that displays a certain text from a website, the text on the website is updated daily:
MMM-PoemOfTheDay is perfect to adapt for your need. Instead of poem site you need to get data from WatchTower site and parse the html response to extract the text.
wow, thank you very much for your feedback, I’ll try to see if I can do it.
-
@ashishtank ok, I have installed the module, but it only shows me a black screen
-
@Amoniak any error in dev console or PM2/terminal ?
-
@ashishtank i got it now, i will now try to parse the html response to extract the text, any good tips?
-
@Amoniak yes, I checked the response from watch tower in postman and they give data of last 2-3 days or may be from Sunday to this day, so you will need to select the right node. You can use class
tabContent
as identifier and today’s date for selection of the node. Also check which html parse is good enough, as HTML is very complex to parse you may want to choose right parser which gives speed and is lightweight. i.e. node-html-parserOther thing you can do is once you have parsed text data from watch tower, you can assign it to poem’s format (title, content and name) and it will just work. later on you can change the UI and text property names if you want.
-
@ashishtank cheerio lib will parse html to json
-
well, I’ll get started then. Keep your fingers crossed.