I am developing a skill that reads out a local online newspaper and I'm using some web scraping functions to get images, text and url I need (the skill is also supporting APL for GUI elements).
The problem is that if I execute the function in a normal offline IDE and print out the results the request takes up to 2.5s and when I'm testing it with the Echo it takes up to 5s and sometimes it even timeout. I tried to optimize the code as best as I could but the problem persist. I am currently using cheerio and request as additional modules alongside promises to ensure that some code is executed after i got the information I need.
Is there a way I can get the information I want without Web Scraping? Right now the user experience is pretty bad. The website I'm scraping is made with Wordpress, if that can help in some way.
I also would like to know what are the factors, in general, that can increase the time between a question and a response. I am using Lambda as backend (Ireland).