Currently I am working on developing a webpage version control backup/log system. The goal is to automatically save a static copy of the webpage, including all its CSS and JavaScript files, whenever there are any changes made.
I have already figured out how to retrieve the HTML content of the webpage by connecting to it directly. However, I am now facing the challenge of extracting the CSS and JavaScript files as well to create a complete backup.
Since the system does not provide direct access to the web server, I need to find a way to remotely fetch these resources over the network.
One approach I'm considering is parsing the scraped HTML for references to '.css' and '.js' files, then retrieving the contents up until the first quote mark '". This would allow me to directly access the CSS and JavaScript files linked within the page. However, I am unsure if this method is reliable enough for my needs.
I am seeking advice on the best way to obtain the CSS and JavaScript files from a webpage remotely. Hopefully, with some guidance, I can improve the efficiency and reliability of my current approach.