- Copy the following URL in your web browser: https://www.whats-on-netflix.com/library/categories/
- Copy and paste the following code in the developer console on the previous URL.
- The result is in your clipboard.
function simulateClick(elem) {
const evt = new MouseEvent('click', {
bubbles: true,
cancelable: true,
view: window
});
const canceled = !elem.dispatchEvent(evt);
};
function getPageData() {
return Array.from(document.querySelectorAll('.dataTable>tbody>tr'))
.map(l => ({ code: l.outerText.split(' ').pop(), name: l.outerText.split(' ')[0]}));
}
let result = [];
while (!document.querySelector('#devices_next').className.includes('disabled')) {
result.push(getPageData());
simulateClick(document.querySelector('#devices_next'));
}
result.push(getPageData());
copy(result);