Ah, selenium, neat! I'll have to give that a try sometime.
I'm still working on the automation aspect, however I do at least have something for automatically marking the start/end positions for individual segments. So, with that, you can tell the camera to loop playback within an individual segment, or proceed to saving that individual segment.
The challenge I ran into with automating saves, is related to the delay between video state transitions. You can observe this both- when a save starts, and when it finishes. There's usually a few extra seconds of delay while the camera switches pipelines between a black video state, and displaying your recording. With that said, technically, the fastest way to automate multiple saves, would be to save all of the segments at once, and then split the recordings in post. DNG or TIFF formats can make that a bit easier as well, since you can separate the frames for each segment via filesystem operations, rather than having to use video software for splitting a MP4 into multiple files. You could even do that via SSH operations without interrupting recording.
Unfortunately the camera software doesn't provide any visual feedback while recording in segmented mode. You could check the box for Text Overlays (underneath the Settings menu during playback), and track previously captured segments with the "sg=" portion of the overlaid text.
Another trick, since you're using the web interface, is you could switch to over to the "Documentation" tab, and monitor the array of 'videoSegments' live from there. At least that way you could keep an eye on what's going on without turning on the Text Overlay, or switching to playback mode.
An important note with Segmented recording mode, is that all of the record buttons- the pyhsical red button, the button displayed on the LCD, and the button in the web interface, will NOT trigger recording another segment. If you press one of those buttons after recording a segment, it will flush the previous segment(s), so be careful with that!! Segments are triggered via I/O, and it might take a bit of practice to get the hang of using it.