I used to have the following python + selenium library code to like any IG post.
Below is a snippet code:
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
"""
imagine on chrome browser you click on any IG picture of a gallery
of a specific account
then you see only that specific picture have the heart icon to click to like
see printscreen below
"""
like = browser.find_element_by_css_selector("[aria-label='Like']")
like.get_attribute("aria-label")
like.click() #error on this line !!!!!!
It used to work before, but recently I get the following error:
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <span aria-label="Like" class="glyphsSpriteHeart__filled__16__white u-__7"></span> is not clickable at point (827, 76). Other element would receive the click: <div class=" _32yJO" role="dialog">...</div>
(Session info: chrome=95.0.4638.69)
Could someone help me with this issue?