MCPcopy Create free account
hub / github.com/InstaPy/InstaPy / verify_liked_image

Function verify_liked_image

instapy/like_util.py:817–828  ·  view source on GitHub ↗

Check for a ban on likes using the last liked image

(browser, logger)

Source from the content-addressed store, hash-verified

815
816
817def verify_liked_image(browser, logger):
818 """Check for a ban on likes using the last liked image"""
819
820 browser.refresh()
821 unlike_xpath = read_xpath(like_image.__name__, "unlike")
822 like_elem = browser.find_elements(By.XPATH, unlike_xpath)
823
824 if len(like_elem) == 1:
825 return True
826 else:
827 logger.warning("--> Image was NOT liked! You have a BLOCK on likes!")
828 return False
829
830
831def get_tags(browser, url):

Callers 1

like_imageFunction · 0.85

Calls 1

read_xpathFunction · 0.85

Tested by

no test coverage detected