<div id="~" class="dm-post-0 well clearfix post listview"
data-identifier="~" data-relative="https://url_that_i_want_to_capture"
data-feed="~">
let convertEntries = () => {
"use strict";
let target = [...document.getElementsByClassName("listview")];
let result = [];
target.forEach((element) => {
result.push({
title: element.querySelector(".list-header strong").textContent,
url: element.querySelector("#listview").dataset.relative,
});
});
return result;
};
I can now capture just the text within the strong
tag. However, I cannot capture the data-relative
attribute.