instagram机器人柜台

时间:2020-03-17 21:46:40

标签: selenium count instagram bots

我做了一个instagram机器人。当程序运行时,我希望instabot数出posts.deployed到窗口7,我用python

这是我到目前为止写的:



for i in range(1,2):
    try: 
        driver.execute_script("window.scrollTo(0, document.body.scrollHeight)")
        time.sleep(2)
        hrefss=driver.find_elements_by_tag_name('a')
        hrefs = [elem.get_attribute('href') for elem in hrefss if '.com/p/' in elem.get_attribute('href')]
        time.sleep(2)
    except Exception:
        continue

    for href in hrefs:
        driver.get(href)
        try:            
            driver.find_element_by_class_name('_8-yf5 ').click()

0 个答案:

没有答案