I am creating scraping API and yesterday I bumped into a dilemma. When using puppeteer I saw that it takes a long time for certain request to be made and after asking it turned out that there is no need to use puppeteer for static content. For static content cheerio is more appropriate. But then immediately another question arised – if cheerio is better for static websites and puppeteer is better for dynamic websites, is there a way to see programatically if website is dynamic or static and based on that use the appropriate scraping tool. And will this slow the performance of the API? I won’t include any code because it doesn’t seem appropriate.
Thank you all in advance!