You must use a tool that is able to render and execute javascript. That basically means a web browser. There are several ones available, some based on Firefox some based on Chrome.
Given the links you provided I think Puppeteer from Google (https://pptr.dev/) will allow you to do what you need.
But it seems to me you are underestimating the complexity of scraping a website. Be prepared to overcome many difficulties, the most important one being the site you are scraping not liking having it's data scraped and taking drastic countermeasures. This approach will probably work to scrape a few pages but hardly a lot of data.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…