var tGalleryImages = document.querySelectorAll('.gallery-imgs-class');
var linksArray = new Array();
tGalleryImages.forEach(img => { linksArray.push(img.querySelector('table a').href) });
copy(linksArray)
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>