Comments (3)
2022년 2월 5일 확인 결과
- 인스타그램 페이지 구조 변경으로 인하여 기존에 css_selector에 넣어 다음 페이지로 넘어가는 버튼을 찾는데 사용하던 class 명 사용 불가
from instagram_crawler.
변경된 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.
원인
- 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)
- 댓글 중 한글이 깨지는 문제
- 페이스북 로그인 불가 문제
- UnboundLocalError: local variable 'is_save_file_success' referenced before assignment
- 인스타그램 태그 이외에 추출이 되지 않는 문제
- NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"div._9AhH0"}
- 인스타그램 구조 변경 반영 필요 HOT 1
- Selenium web driver Version Up Issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instagram_crawler.