Answer the question
In order to leave comments, you need to log in
How to remove google images results with javascript?
In Google images, each result is, roughly speaking, a block (element?) of a clickable image and a clickable text link to the site under this image.
With the help of RMB-Inspect (Ctrl + Shift + I in Chrome) we managed to find this "block" - it starts with
<div jscontroller="Q7Rsec" data-ri="0" class="rg_bx rg_di rg_el ivg-i
. then comes some cipher (id?) likedata-ved="0ahUKEwiXts3WzsveAhVBl4sKHVQwBcsQMwhrKAAwAA"
etc. def _OnDomReady(self):
self.browser.ExecuteJavascript("document.getElementById('lga').style.display = 'none'; ")
Answer the question
In order to leave comments, you need to log in
Can this be done (remove the result) with JavaScript?
If so, how can you get the id of that element?
[/* Массив со ссылками */].forEach(function(i) {
document.querySelector('[href=' + i + ']').remove();
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question