I've been attempting to extract the URL from a background image using Xpath or Javascript, but so far I haven't had any success. Here's what I currently have:
<div style="width: 100%; display: inline-block;">
<div tws-article-images-preload="item" class="tws-article-images--preload ng-scope tws-article-images--
image-small" ng-click="closeImage()" use-original="useOriginal" style="background-image:
url("https://i.pinimg.com/originals/59/54/b4/5954b408c66525ad932faa693a647e3f.jpg;);">
</div>
</div>
I've experimented with different modifications of the following two methods to try and achieve this goal:
//*[starts-with(@style, 'background-image: url()] <--This did not work
return document.getElementsByClassName('tws-article-images--preload ng-scope tws-article-images--image-small').src