if your router accepts HTTP Basic Auth.
I highly doubt it will though.
Username and password auth is not as simple as you think. It usually involves many steps performed between your browser and the server (router web server) to work.
For your other option, I write web scrapers all the time, so it would be easy, but you haven’t mentioned your coding capacity or even what parameters are expected in the POST to your router.
Just via Basic auth it didn’t work. what are more possibilities, maybe take a screenshot of the page and save every 10 seconds on the local file? Just like that?