I need to extract a link that is generated on the client side when clicking a button.
When clicking the button the browser opens a new page and redirects the user to the advertiser. How can I get this link?
I need to extract a link that is generated on the client side when clicking a button.
When clicking the button the browser opens a new page and redirects the user to the advertiser. How can I get this link?
Just do simple query for that element and get text:
document.querySelector('#visit-advertiser:j .ytp-ad-button-text').textContent