Giter VIP home page Giter VIP logo

Comments (3)

SOMJANG avatar SOMJANG commented on June 24, 2024

2022년 2월 5일 확인 결과

  • 인스타그램 페이지 구조 변경으로 인하여 기존에 css_selector에 넣어 다음 페이지로 넘어가는 버튼을 찾는데 사용하던 class 명 사용 불가

from instagram_crawler.

SOMJANG avatar SOMJANG commented on June 24, 2024

변경된 class 명

  • 기존 : "._65Bje.coreSpriteRightPaginationArrow"
  • 변경 : ".wpO6b "

변경 후 테스트 결과

Message: element click intercepted: Element <button class="wpO6b ZQScA " type="button">...</button> is not clickable at point (917, 30). Other element would receive the click: <div class="RnEpo   _Yhr4     " role="presentation">...</div>
  (Session info: chrome=98.0.4758.80)

Traceback (most recent call last):
  File "<ipython-input-16-84e29c819442>", line 307, in extract_insta_data
    next_arrow_btn.click()
  File "/Users/donghyunjang/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click
    self._execute(Command.CLICK_ELEMENT)
  File "/Users/donghyunjang/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute
    return self._parent.execute(command, params)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <button class="wpO6b ZQScA " type="button">...</button> is not clickable at point (917, 30). Other element would receive the click: <div class="RnEpo   _Yhr4     " role="presentation">...</div>
  (Session info: chrome=98.0.4758.80)

위와 같은 에러 발생

from instagram_crawler.

SOMJANG avatar SOMJANG commented on June 24, 2024

원인

  • div 가 한 겹 감싸고 있어 바로 클릭 불가

해결

  • css_selector 에서 사용하는 값 ".wpO6b " 에서 "div.l8mY4.feth3 > .wpO6b " 로 변경
  • .click() 대신 .send_keys(Keys.ENTER) 사용
    from selenium.webdriver.common.keys import Keys
    WebDriverWait(driver, 100).until(EC.presence_of_element_located((By.CSS_SELECTOR, next_arrow_btn_css1)))
    time.sleep(5.0)
    next_arrow_btn = driver.find_element_by_css_selector(next_arrow_btn_css1)
    next_arrow_btn.send_keys(Keys.ENTER)

from instagram_crawler.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.