Skip to content
Advertisement

Tag: dom

How to get all the favicon from the site, by url

Here is my parser: It returns an array of URLs, with all URL favicons. How can the user get these favicons? when entering the URL in the input and get the favicons. Like google labels, we enter the URL and get the labels with the favicon How can I do the same thing? Answer I hope this example would help:

loop document.getElementsByClassName

I should loop document.getElementsByClassName but first doing a check. For just one element I would do this: But I have to repeat it for more elements and I never know how many there are. I would need such a loop but with the verification document.getElementsByClassName (‘lazyload img-responsive wp-post-image’) [0] .getAttribute (‘width’) <500 first. How could I solve? Thanks Answer Not

scrollIntoView() looping element on puppeteer

I want to scrape a list of posts while the page scroll is infinite loading. I want scrollIntoView() for each element in the loop. my code is temporarily like this and the result when the page is loaded, it bounces out but no error. For example, I want to take 20 posts and then the scraper will take the posts

Playwright Select frame with dynamic name

I need to access an iframe in playwright that has a name that is automatically generated. The iframe’s name is always prefixed by “__privateStripeFrame” and then a randomly generated number How i can access the frame with the page.frame({name: }) ? From the docs it seems like i can’t use a regular expression! Answer The frameSelector doesn’t need be specified

Scroll event JQuery – Detecting bottom page

Im trying to make an infinite scroll page. The script works well on my computer (Chrome) but not on my friend’s computer (chrome too). I saw it does work when it comes to detect the bottom of the page when the content at the bottom was append via ajax. I also saw that the loading content works once i change

Advertisement