<svg class="paint" version="1.1" xmlns="http://www.w3.org/2000/svg">
<rect class="svgobject" x="458" y="165.28750610351562" width="142" height="56" fill="black" stroke="black" id="154" transform="translate(0,0)">
</rect>
</svg>
If I have a webpage with an embedded SVG element like the one above, how can I create a function to extract the SVG and save it locally as a .svg file? Any guidance on this would be greatly appreciated.