Open laurenfields opened 2 years ago
Hi, try using this code below in your script, provided by cbrown83 here.
def get_closet_share_icons():
item_pat = "//div[@class='social-info social-actions d-fl ai-c jc-c']"
items = driver.find_elements_by_xpath(item_pat)
share_icons = [i.find_element_by_css_selector("a[class='share']") for i in items]
if not share_icons:
item_pat = "//div[@class='d--fl ai--c social-action-bar__action social-action-bar__share']"
items = driver.find_elements_by_xpath(item_pat)
share_icons = [i.find_element_by_css_selector(".share-gray-large") for i in items]
return share_icons
def clicks_share_followers(share_icon, d=4.5):
## First share click
driver.execute_script("arguments[0].click();", share_icon); time.sleep(rt(d))
## Second share click
try:
share_pat = "//a[@class='pm-followers-share-link grey']"
share_followers = driver.find_element_by_xpath(share_pat)
driver.execute_script("arguments[0].click();", share_followers); time.sleep(rt(d))
except:
share_pat = "//a[@class='internal-share__link']"
share_followers = driver.find_element_by_xpath(share_pat)
driver.execute_script("arguments[0].click();", share_followers); time.sleep(rt(d))
@anniebritton This worked for me. Thanks!
Hi! I have been trying to get this script to work. It is able to successfully sign me in, nagivate to my closet, scroll to the bottom of
I have ensured that the username provided is not my email address. How should I address this?
Thanks!